From e0523ecd8d587d0fa7351e071425d7b81498fcff Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sun, 17 May 2020 22:24:04 +0200 Subject: Properly annotate non-exhaustive enum --- askama_shared/src/error.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'askama_shared/src') 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 = ::std::result::Result; /// 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 { -- cgit