Provide an fmt::Debug impl for entity references.
Instead of deriving a Debug impl: Ebb(45), use the Display version for Debug too: ebb45. This is more readable, and no information is lost.
This commit is contained in:
@@ -87,5 +87,11 @@ macro_rules! entity_impl {
|
||||
write!(f, "{}{}", $display_prefix, self.0)
|
||||
}
|
||||
}
|
||||
|
||||
impl ::std::fmt::Debug for $entity {
|
||||
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
|
||||
(self as &::std::fmt::Display).fmt(f)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user