Skip to content

Commit 053a054

Browse files
committed
converted crypto::hash::Hash::fmt to use pretty_hash::fmt
1 parent 895d853 commit 053a054

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/crypto/hash.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
pub use blake2_rfc::blake2b::Blake2bResult;
22

3-
use crate::storage::Node;
43
use blake2_rfc::blake2b::Blake2b;
54
use byteorder::{BigEndian, WriteBytesExt};
5+
use crate::storage::Node;
66
// use ed25519_dalek::PublicKey;
77
use merkle_tree_stream::Node as NodeTrait;
8+
use pretty_hash::fmt as pretty_fmt;
89
use std::convert::AsRef;
910
use std::fmt;
1011
use std::mem;
@@ -141,8 +142,9 @@ impl DerefMut for Hash {
141142
}
142143

143144
impl fmt::Display for Hash {
145+
144146
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
145-
write!(f, "{:x?}", self.hash)
147+
write!(f, "{}", pretty_fmt(&self.hash[..]).unwrap())
146148
}
147149
}
148150

0 commit comments

Comments
 (0)