diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-05-17 22:24:04 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-05-17 22:24:04 +0200 |
commit | e0523ecd8d587d0fa7351e071425d7b81498fcff (patch) | |
tree | b8de52c82ffb0aa754069c6cc8442e161806eb44 | |
parent | 68fd00f8f8fdefdf5bbc442113fc47b48e4748df (diff) | |
download | askama-e0523ecd8d587d0fa7351e071425d7b81498fcff.tar.gz askama-e0523ecd8d587d0fa7351e071425d7b81498fcff.tar.bz2 askama-e0523ecd8d587d0fa7351e071425d7b81498fcff.zip |
Properly annotate non-exhaustive enum
-rw-r--r-- | askama_shared/src/error.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/askama_shared/src/error.rs b/askama_shared/src/error.rs index 4d0fad9..a6dc099 100644 --- a/askama_shared/src/error.rs +++ b/askama_shared/src/error.rs @@ -22,6 +22,7 @@ pub type Result<I> = ::std::result::Result<I, Error>; /// bring to this crate are small, which is why /// `std::error::Error` was used. /// +#[non_exhaustive] #[derive(Debug)] pub enum Error { /// formatting error @@ -34,12 +35,6 @@ pub enum Error { /// yaml conversion error #[cfg(feature = "serde_yaml")] Yaml(::serde_yaml::Error), - - /// This error needs to be non-exhaustive as - /// the `Json` variants existence depends on - /// a feature. - #[doc(hidden)] - __Nonexhaustive, } impl std::error::Error for Error { |