diff --git a/crates/ruma-identifiers/src/macros.rs b/crates/ruma-identifiers/src/macros.rs index ec121f4a..4e8dc5e7 100644 --- a/crates/ruma-identifiers/src/macros.rs +++ b/crates/ruma-identifiers/src/macros.rs @@ -205,7 +205,7 @@ macro_rules! opaque_identifier { impl std::fmt::Debug for $id { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.write_str(self.as_ref()) + ::fmt(self.as_str(), f) } } @@ -338,7 +338,7 @@ macro_rules! opaque_identifier_validated { impl std::fmt::Debug for $id { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - f.write_str(self.as_ref()) + ::fmt(self.as_str(), f) } }