diff --git a/numbat/src/markup.rs b/numbat/src/markup.rs index 9bb1f286..cdc44672 100644 --- a/numbat/src/markup.rs +++ b/numbat/src/markup.rs @@ -30,6 +30,15 @@ pub enum CompactStrCow { Static(&'static str), } +impl std::fmt::Display for CompactStrCow { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + CompactStrCow::Owned(s) => write!(f, "{s}"), + CompactStrCow::Static(s) => write!(f, "{s}"), + } + } +} + impl From for CompactString { fn from(value: CompactStrCow) -> Self { match value {