From 5143b7ffd9076dd6d70c0f598723fa34286b4038 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:51:50 +0100 Subject: [PATCH] chore: better debug impl (#16) - use 0x - manually write the tuple so it doesn't spill on 3 lines on {:#?}, and so it doesn't add quotes "" --- src/nibbles.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nibbles.rs b/src/nibbles.rs index 381c77a..d6776e3 100644 --- a/src/nibbles.rs +++ b/src/nibbles.rs @@ -75,7 +75,7 @@ impl Clone for Nibbles { impl fmt::Debug for Nibbles { #[inline] fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_tuple("Nibbles").field(&const_hex::encode(self.as_slice())).finish() + write!(f, "Nibbles(0x{})", const_hex::encode(self.as_slice())) } }