identifiers: Fix Debug output of opaque identifier types

This commit is contained in:
Jonas Platte 2021-09-17 20:09:21 +02:00
parent 5d27a36cb1
commit 4f3eaa83a0
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67

View File

@ -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())
<str as std::fmt::Debug>::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())
<str as std::fmt::Debug>::fmt(self.as_str(), f)
}
}