From f52f10abc292cf169f104a7096da8b4d3751b47e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 13 Jun 2020 16:43:32 +0800 Subject: [PATCH] remove unnecessary dereferencing --- src/runtime/src/comms.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/runtime/src/comms.rs b/src/runtime/src/comms.rs index 07fa583c..a522dd93 100644 --- a/src/runtime/src/comms.rs +++ b/src/runtime/src/comms.rs @@ -41,11 +41,11 @@ pub type Result = core::result::Result; impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match self { - &Error::NetworkError(error) => write!(f, "network error: {}", error), - &Error::UnexpectedPattern => write!(f, "unexpected pattern"), - &Error::UnrecognizedPacket => write!(f, "unrecognized packet"), - &Error::BufferExhausted => write!(f, "buffer exhausted"), - &Error::Utf8Error(error) => write!(f, "UTF-8 error: {}", error), + Error::NetworkError(error) => write!(f, "network error: {}", error), + Error::UnexpectedPattern => write!(f, "unexpected pattern"), + Error::UnrecognizedPacket => write!(f, "unrecognized packet"), + Error::BufferExhausted => write!(f, "buffer exhausted"), + Error::Utf8Error(error) => write!(f, "UTF-8 error: {}", error), } } }