/// This hasher currently always uses the stable Blake2b algorithm
/// and allows for variable output lengths through its type
/// parameter.
-#[derive(Debug)]
pub struct StableHasher<W> {
state: Blake2bHasher,
bytes_hashed: u64,
width: PhantomData<W>,
}
+impl<W: StableHasherResult> ::std::fmt::Debug for StableHasher<W> {
+ fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
+ write!(f, "{:?}", self.state)
+ }
+}
+
pub trait StableHasherResult: Sized {
fn finish(hasher: StableHasher<Self>) -> Self;
}