diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-01-29 09:15:53 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-01-29 09:25:59 +0100 |
commit | 58a33c9b26be0cd25cc39d6421eb6e6491c27865 (patch) | |
tree | 14c88ec203f3472edadbb60960fd5c8f1d0e298f | |
parent | ff24eef1ff7dcf3849fd1e6d9efec0de2bc57005 (diff) | |
download | askama-58a33c9b26be0cd25cc39d6421eb6e6491c27865.tar.gz askama-58a33c9b26be0cd25cc39d6421eb6e6491c27865.tar.bz2 askama-58a33c9b26be0cd25cc39d6421eb6e6491c27865.zip |
Error::description() will be deprecated soon
Diffstat (limited to '')
-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")] |