From 027ac73a3e07280562640db970056d9d002342a0 Mon Sep 17 00:00:00 2001 From: rafal-ch Date: Thu, 5 Feb 2026 12:35:25 +0100 Subject: [PATCH] Add `to_hex()` to `Blake3256` for convenient logging --- rust/hermes-ipfs/src/doc_sync/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rust/hermes-ipfs/src/doc_sync/mod.rs b/rust/hermes-ipfs/src/doc_sync/mod.rs index 11ad0c82849..bd9841923d5 100644 --- a/rust/hermes-ipfs/src/doc_sync/mod.rs +++ b/rust/hermes-ipfs/src/doc_sync/mod.rs @@ -94,6 +94,13 @@ impl<'b, C> Decode<'b, C> for Signature { #[derive(Clone, Debug, PartialEq, Eq, Copy)] pub struct Blake3256(blake3::Hash); +impl Blake3256 { + /// Hex string representation of the hash. + pub fn to_hex(&self) -> String { + self.0.to_hex().to_string() + } +} + impl Encode for Blake3256 { fn encode( &self,