aboutsummaryrefslogtreecommitdiff
path: root/src/test.rs
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2021-03-21 20:42:58 -0400
committerJack O'Connor <[email protected]>2021-03-21 21:14:44 -0400
commit9ef2f4d9a8a50def1fea7096283f6a9408c1a0a6 (patch)
tree4961d6fff984bbb78ca0bfc5a12bf9cfa6fed828 /src/test.rs
parent05292a018b25e47c2f094aa335a3bef5f4c0ac1a (diff)
implement Display for Hash
Diffstat (limited to 'src/test.rs')
-rw-r--r--src/test.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test.rs b/src/test.rs
index 67e2b8b..b16e043 100644
--- a/src/test.rs
+++ b/src/test.rs
@@ -534,6 +534,8 @@ fn test_hex_encoding_decoding() {
hasher.update(b"foo");
let digest = hasher.finalize();
assert_eq!(digest.to_hex().as_str(), digest_str);
+ #[cfg(feature = "std")]
+ assert_eq!(digest.to_string(), digest_str);
// Test round trip
let digest = crate::Hash::from_hex(digest_str).unwrap();