improve hashed_storage_read

This commit is contained in:
Simon Gardling
2022-05-20 12:37:48 -04:00
parent 4a90440f64
commit 276d1f3f20
3 changed files with 12 additions and 12 deletions

View File

@@ -105,14 +105,17 @@ fn hashed_storage() {
data.as_slice(),
);
let read = hashed_storage_read(storage);
assert_eq!(read.map(|(a, b)| (a.to_vec(), b)), Some((commit, data)));
let read = hashed_storage_read(&storage);
assert_eq!(
read.map(|(a, b)| (a.to_vec(), b.to_vec())),
Some((commit.to_vec(), data.to_vec()))
);
}
#[test]
fn invalid_hashed_storage() {
use ytbn_graphing_software::hashed_storage_read;
assert_eq!(hashed_storage_read("aaaa".to_owned()), None);
assert_eq!(hashed_storage_read("aaaa"), None);
}
#[test]