Use debug_tuple instead of string formatting

Jonas Schäfer created

This provides standard-library-like output.

Change summary

jid/src/lib.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Detailed changes

jid/src/lib.rs 🔗

@@ -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()
     }
 }