Store hashes in special types so they aren't accidentally encoded as numbers

This commit is contained in:
Ben Kimock
2023-04-07 23:11:20 -04:00
parent de96f3d873
commit 0445fbdd83
38 changed files with 274 additions and 138 deletions

View File

@@ -72,7 +72,7 @@ fn test_hash_isize() {
assert_eq!(h.finalize(), expected);
}
fn hash<T: HashStable<()>>(t: &T) -> u128 {
fn hash<T: HashStable<()>>(t: &T) -> Hash128 {
let mut h = StableHasher::new();
let ctx = &mut ();
t.hash_stable(ctx, &mut h);