diff --git a/packages/yew/src/virtual_dom/mod.rs b/packages/yew/src/virtual_dom/mod.rs index 24de102ed4a..3998396daa9 100644 --- a/packages/yew/src/virtual_dom/mod.rs +++ b/packages/yew/src/virtual_dom/mod.rs @@ -97,7 +97,11 @@ impl AsRef for AttrValue { impl fmt::Display for AttrValue { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { - write!(f, "{}", self) + match self { + AttrValue::Static(s) => write!(f, "{}", s), + AttrValue::Owned(s) => write!(f, "{}", s), + AttrValue::Rc(s) => write!(f, "{}", s), + } } }