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 <noreply@anthropic.com>
This commit is contained in:
fryorcraken 2026-02-27 15:41:49 +11:00
parent 18d9d80105
commit 3cd5e3c3f7
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4

View File

@ -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;