Skip to content

Commit 4b7139a

Browse files
committed
cache_weight: Improve HashMap impl
1 parent a80ac83 commit 4b7139a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graph/src/util/cache_weight.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl<T: CacheWeight, U: CacheWeight> CacheWeight for std::collections::HashMap<T
4343
self.iter()
4444
.map(|(key, value)| key.indirect_weight() + value.indirect_weight())
4545
.sum::<usize>()
46-
+ self.capacity() * mem::size_of::<T>()
46+
+ self.capacity() * mem::size_of::<(T, U, u64)>()
4747
}
4848
}
4949

0 commit comments

Comments
 (0)