diff --git a/src/util/macros.rs b/src/util/macros.rs index d63591aa..d703e258 100644 --- a/src/util/macros.rs +++ b/src/util/macros.rs @@ -85,6 +85,13 @@ macro_rules! generate_attribute { }) } } + impl std::fmt::Display for $elem { + fn fmt(&self, fmt: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { + write!(fmt, "{}", match self { + $($elem::$a => $b),+ + }) + } + } impl ::minidom::IntoAttributeValue for $elem { fn into_attribute_value(self) -> Option { Some(String::from(match self {