From b11b08954c6cefd16c4356cd3ec094c4bf29a6ca Mon Sep 17 00:00:00 2001 From: Todd Mortimer Date: Wed, 11 Nov 2020 11:34:42 -0500 Subject: [PATCH] Fix clippy manual_non_exhaustive lint. --- src/error.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/error.rs b/src/error.rs index c062d56..dc57422 100644 --- a/src/error.rs +++ b/src/error.rs @@ -21,6 +21,7 @@ pub type Result = result::Result; /// A set of errors that can occur in the IMAP client #[derive(Debug)] +#[non_exhaustive] pub enum Error { /// An `io::Error` that occurred while trying to read or write to a network stream. Io(IoError), @@ -43,8 +44,6 @@ pub enum Error { Validate(ValidateError), /// Error appending an e-mail. Append, - #[doc(hidden)] - __Nonexhaustive, } impl From for Error { @@ -99,7 +98,6 @@ impl fmt::Display for Error { Error::Bad(ref data) => write!(f, "Bad Response: {}", data), Error::ConnectionLost => f.write_str("Connection Lost"), Error::Append => f.write_str("Could not append mail to mailbox"), - Error::__Nonexhaustive => f.write_str("Unknown"), } } } @@ -119,7 +117,6 @@ impl StdError for Error { Error::No(_) => "No Response", Error::ConnectionLost => "Connection lost", Error::Append => "Could not append mail to mailbox", - Error::__Nonexhaustive => "Unknown", } }