forked from M-Labs/nac3
1
0
Fork 0

remove unnecessary dereferencing

This commit is contained in:
Sebastien Bourdeauducq 2020-06-13 16:43:32 +08:00
parent 1138db34a2
commit f52f10abc2
1 changed files with 5 additions and 5 deletions

View File

@ -41,11 +41,11 @@ pub type Result<T> = core::result::Result<T, Error>;
impl fmt::Display for Error { impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self { match self {
&Error::NetworkError(error) => write!(f, "network error: {}", error), Error::NetworkError(error) => write!(f, "network error: {}", error),
&Error::UnexpectedPattern => write!(f, "unexpected pattern"), Error::UnexpectedPattern => write!(f, "unexpected pattern"),
&Error::UnrecognizedPacket => write!(f, "unrecognized packet"), Error::UnrecognizedPacket => write!(f, "unrecognized packet"),
&Error::BufferExhausted => write!(f, "buffer exhausted"), Error::BufferExhausted => write!(f, "buffer exhausted"),
&Error::Utf8Error(error) => write!(f, "UTF-8 error: {}", error), Error::Utf8Error(error) => write!(f, "UTF-8 error: {}", error),
} }
} }
} }