From d63db8523cd59ca5413046a44fc432a7da34a61b Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 14 Jan 2016 13:10:18 +0100 Subject: [PATCH] Fix test, revert fn hex() behaviour. --- src/hash.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hash.rs b/src/hash.rs index 0d26d74e6..f67833072 100644 --- a/src/hash.rs +++ b/src/hash.rs @@ -383,7 +383,7 @@ macro_rules! impl_hash { } impl $from { pub fn hex(&self) -> String { - format!("{}", self) + format!("{:?}", self) } pub fn from_bloomed(b: &T) -> Self where T: FixedHash { b.bloom_part($size) } @@ -520,7 +520,7 @@ mod tests { fn hash() { let h = H64([0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef]); assert_eq!(H64::from_str("0123456789abcdef").unwrap(), h); - assert_eq!(format!("{}", h), "0123456789abcdef"); + assert_eq!(format!("{}", h), "012345…ef"); assert_eq!(format!("{:?}", h), "0123456789abcdef"); assert_eq!(h.hex(), "0123456789abcdef"); assert!(h == h);