Fix clippy manual_non_exhaustive lint.
This commit is contained in:
parent
753e1b9db1
commit
b11b08954c
1 changed files with 1 additions and 4 deletions
|
|
@ -21,6 +21,7 @@ pub type Result<T> = result::Result<T, Error>;
|
||||||
|
|
||||||
/// A set of errors that can occur in the IMAP client
|
/// A set of errors that can occur in the IMAP client
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
#[non_exhaustive]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// An `io::Error` that occurred while trying to read or write to a network stream.
|
/// An `io::Error` that occurred while trying to read or write to a network stream.
|
||||||
Io(IoError),
|
Io(IoError),
|
||||||
|
|
@ -43,8 +44,6 @@ pub enum Error {
|
||||||
Validate(ValidateError),
|
Validate(ValidateError),
|
||||||
/// Error appending an e-mail.
|
/// Error appending an e-mail.
|
||||||
Append,
|
Append,
|
||||||
#[doc(hidden)]
|
|
||||||
__Nonexhaustive,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<IoError> for Error {
|
impl From<IoError> for Error {
|
||||||
|
|
@ -99,7 +98,6 @@ impl fmt::Display for Error {
|
||||||
Error::Bad(ref data) => write!(f, "Bad Response: {}", data),
|
Error::Bad(ref data) => write!(f, "Bad Response: {}", data),
|
||||||
Error::ConnectionLost => f.write_str("Connection Lost"),
|
Error::ConnectionLost => f.write_str("Connection Lost"),
|
||||||
Error::Append => f.write_str("Could not append mail to mailbox"),
|
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::No(_) => "No Response",
|
||||||
Error::ConnectionLost => "Connection lost",
|
Error::ConnectionLost => "Connection lost",
|
||||||
Error::Append => "Could not append mail to mailbox",
|
Error::Append => "Could not append mail to mailbox",
|
||||||
Error::__Nonexhaustive => "Unknown",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue