Skip to content

Commit

Permalink
chore: better debug impl
Browse files Browse the repository at this point in the history
- use 0x
- manually write the tuple so it doesn't spill on 3 lines on {:#?},
  and so it doesn't add quotes ""
  • Loading branch information
DaniPopes committed Jan 6, 2025
1 parent 9b4a95d commit 5fff574
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nibbles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}
}

Expand Down

0 comments on commit 5fff574

Please sign in to comment.