diff --git a/apb/src/macros.rs b/apb/src/macros.rs index dd062aae..28a9af32 100644 --- a/apb/src/macros.rs +++ b/apb/src/macros.rs @@ -38,6 +38,12 @@ macro_rules! strenum { $($deep($inner),)* } + impl std::fmt::Display for $enum_name { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + write!(f, "{}", self.as_ref()) + } + } + impl AsRef for $enum_name { fn as_ref(&self) -> &str { match self {