From 45f1567ff27f374cc1bf2f018f79da956865fe16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sch=C3=A4fer?= Date: Sun, 3 Mar 2024 15:55:11 +0100 Subject: [PATCH] Use debug_tuple instead of string formatting This provides standard-library-like output. --- jid/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jid/src/lib.rs b/jid/src/lib.rs index ab24bf44..0de4d362 100644 --- a/jid/src/lib.rs +++ b/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() } }