Skip to content

Commit 19dbe3d

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/crypto/hash.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use blake2_rfc::blake2b::Blake2b;
55
use byteorder::{BigEndian, WriteBytesExt};
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;
@@ -142,7 +143,7 @@ impl DerefMut for Hash {
142143

143144
impl fmt::Display for Hash {
144145
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
145-
write!(f, "{:x?}", self.hash)
146+
write!(f, "{}", pretty_fmt(&self.hash[..]).unwrap())
146147
}
147148
}
148149

0 commit comments

Comments
 (0)