Skip to content

Commit

Permalink
converted crypto::hash::Hash::fmt to use pretty_hash::fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddieRidell committed May 7, 2019
1 parent 895d853 commit 053a054
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/crypto/hash.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
pub use blake2_rfc::blake2b::Blake2bResult;

use crate::storage::Node;
use blake2_rfc::blake2b::Blake2b;
use byteorder::{BigEndian, WriteBytesExt};
use crate::storage::Node;
// use ed25519_dalek::PublicKey;
use merkle_tree_stream::Node as NodeTrait;
use pretty_hash::fmt as pretty_fmt;
use std::convert::AsRef;
use std::fmt;
use std::mem;
Expand Down Expand Up @@ -141,8 +142,9 @@ impl DerefMut for Hash {
}

impl fmt::Display for Hash {

fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{:x?}", self.hash)
write!(f, "{}", pretty_fmt(&self.hash[..]).unwrap())
}
}

Expand Down

0 comments on commit 053a054

Please sign in to comment.