diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-12-07 16:05:02 +0100 |
---|---|---|
committer | Juan Aguilar <mhpoin@gmail.com> | 2018-12-07 19:41:48 +0100 |
commit | 93136a66edcddab7c7800ad487c29d2cb57b713b (patch) | |
tree | 9b5b558125d2ec42571f01692c3a0f8ddff091bc /askama_shared/src/error.rs | |
parent | d42c5c04aa26ca72ab84760b9425891f316bae0a (diff) | |
download | askama-93136a66edcddab7c7800ad487c29d2cb57b713b.tar.gz askama-93136a66edcddab7c7800ad487c29d2cb57b713b.tar.bz2 askama-93136a66edcddab7c7800ad487c29d2cb57b713b.zip |
Fix typo in serde_json feature
Diffstat (limited to '')
-rw-r--r-- | askama_shared/src/error.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/askama_shared/src/error.rs b/askama_shared/src/error.rs index df175cd..90ba571 100644 --- a/askama_shared/src/error.rs +++ b/askama_shared/src/error.rs @@ -7,7 +7,7 @@ pub type Result<I> = ::std::result::Result<I, Error>; /// /// # Feature Interaction /// -/// If the feature `serde-json` is enabled an +/// If the feature `serde_json` is enabled an /// additional error variant `Json` is added. /// /// # Why not `failure`/`error-chain`? @@ -29,7 +29,7 @@ pub enum Error { Fmt(fmt::Error), /// json conversion error - #[cfg(feature = "serde-json")] + #[cfg(feature = "serde_json")] Json(::serde_json::Error), /// This error needs to be non-exhaustive as @@ -43,7 +43,7 @@ impl ErrorTrait for Error { fn description(&self) -> &str { match *self { Error::Fmt(ref err) => err.description(), - #[cfg(feature = "serde-json")] + #[cfg(feature = "serde_json")] Error::Json(ref err) => err.description(), _ => "unknown error: __Nonexhaustive", } @@ -52,7 +52,7 @@ impl ErrorTrait for Error { fn cause(&self) -> Option<&ErrorTrait> { match *self { Error::Fmt(ref err) => err.cause(), - #[cfg(feature = "serde-json")] + #[cfg(feature = "serde_json")] Error::Json(ref err) => err.cause(), _ => None, } @@ -64,7 +64,7 @@ impl Display for Error { match *self { Error::Fmt(ref err) => write!(formatter, "formatting error: {}", err), - #[cfg(feature = "serde-json")] + #[cfg(feature = "serde_json")] Error::Json(ref err) => write!(formatter, "json conversion error: {}", err), _ => write!(formatter, "unknown error: __Nonexhaustive"), } @@ -77,7 +77,7 @@ impl From<fmt::Error> for Error { } } -#[cfg(feature = "serde-json")] +#[cfg(feature = "serde_json")] impl From<::serde_json::Error> for Error { fn from(err: ::serde_json::Error) -> Self { Error::Json(err) |