diff --git a/src/enums.rs b/src/enums.rs index 6c7f8f4..1f4b9b8 100644 --- a/src/enums.rs +++ b/src/enums.rs @@ -14,8 +14,9 @@ pub enum MessageIdentifier { } impl fmt::Display for MessageIdentifier { + #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { + match *self { Self::Request => write!(f, "Request"), Self::Response => write!(f, "Response"), Self::Unacked => write!(f, "Unacked"), @@ -36,9 +37,10 @@ pub enum FunctionCode { RemoteProcedureCall = 0x07, } -impl std::fmt::Display for FunctionCode { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { +impl fmt::Display for FunctionCode { + #[inline] + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match *self { Self::VirtualREAD => write!(f, "VirtualREAD"), Self::VirtualWRITE => write!(f, "VirtualWRITE"), Self::RemoteProcedureCall => write!(f, "RemoteProcedureCall"),