Use debug_tuple instead of string formatting

This provides standard-library-like output.
This commit is contained in:
Jonas Schäfer 2024-03-03 15:55:11 +01:00
parent 8238e81c66
commit 45f1567ff2

View file

@ -301,13 +301,13 @@ pub struct BareJid {
impl fmt::Debug for FullJid {
fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
write!(fmt, "FullJID({})", self)
fmt.debug_tuple("FullJid").field(&self.inner).finish()
}
}
impl fmt::Debug for BareJid {
fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
write!(fmt, "BareJID({})", self)
fmt.debug_tuple("BareJid").field(&self.inner).finish()
}
}