From 4ddfd7d8fc0c89dd5097efc09bb19e993cf54538 Mon Sep 17 00:00:00 2001 From: rascul Date: Fri, 15 Mar 2024 21:12:25 -0500 Subject: [PATCH] support String error --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 631a948..192bc5c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,6 +57,12 @@ impl From for Rear { } } +impl From for Rear { + fn from(error: String) -> Self { + Self { message: error.clone(), error: error.into() } + } +} + #[cfg(feature = "serde_json")] impl From for Rear { fn from(error: serde_json::Error) -> Self {