added display

This commit is contained in:
2025-12-07 17:20:41 +01:00
parent 04ab5e2c4c
commit b3274e942c

View File

@@ -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"),