Show full hex string of hash in fmt::Debug for core::Hash

This commit is contained in:
Eugene P 2019-01-10 12:55:10 +03:00
parent faff529260
commit bc7b701de3

View file

@ -38,10 +38,7 @@ pub struct Hash([u8; 32]);
impl fmt::Debug for Hash {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
for i in self.0[..4].iter() {
write!(f, "{:02x}", i)?;
}
Ok(())
write!(f, "{}", self.to_hex())
}
}