From 3cd5e3c3f7e6a8b9d530417f88f3e7aa3ad9c7ed Mon Sep 17 00:00:00 2001 From: fryorcraken Date: Fri, 27 Feb 2026 15:41:49 +1100 Subject: [PATCH] fix: display HashType as hex string in Debug output The derived Debug impl printed HashType as a raw byte array, while Display (and the sequencer logs) used hex encoding. Replace the derived Debug with a custom impl identical to Display so both representations are consistent. Co-Authored-By: Claude Sonnet 4.6 --- common/src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/src/lib.rs b/common/src/lib.rs index 11fa4c3d..972aeadc 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -17,7 +17,6 @@ pub mod test_utils; pub const PINATA_BASE58: &str = "EfQhKQAkX2FJiwNii2WFQsGndjvF1Mzd7RuVe7QdPLw7"; #[derive( - Debug, Default, Copy, Clone, @@ -37,6 +36,12 @@ impl Display for HashType { } } +impl std::fmt::Debug for HashType { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{}", hex::encode(self.0)) + } +} + impl FromStr for HashType { type Err = hex::FromHexError;