diff options
Diffstat (limited to 'askama_shared/src/error.rs')
-rw-r--r-- | askama_shared/src/error.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/askama_shared/src/error.rs b/askama_shared/src/error.rs index f3e8b48..4d0fad9 100644 --- a/askama_shared/src/error.rs +++ b/askama_shared/src/error.rs @@ -1,4 +1,3 @@ -use std::error::Error as ErrorTrait; use std::fmt::{self, Display}; pub type Result<I> = ::std::result::Result<I, Error>; @@ -43,17 +42,8 @@ pub enum Error { __Nonexhaustive, } -impl ErrorTrait for Error { - fn description(&self) -> &str { - match *self { - Error::Fmt(ref err) => err.description(), - #[cfg(feature = "serde_json")] - Error::Json(ref err) => err.description(), - _ => "unknown error: __Nonexhaustive", - } - } - - fn cause(&self) -> Option<&dyn ErrorTrait> { +impl std::error::Error for Error { + fn cause(&self) -> Option<&dyn std::error::Error> { match *self { Error::Fmt(ref err) => err.source(), #[cfg(feature = "serde_json")] |