diff --git a/src/lib.rs b/src/lib.rs index ccca25b..485bcff 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -63,6 +63,12 @@ impl From for Rear { } } +impl From<&str> for Rear { + fn from(error: &str) -> Self { + Self { message: error.to_string(), error: error.into() } + } +} + #[cfg(feature = "askama")] impl From for Rear { fn from(error: askama::Error) -> Self {