VacantEntry/OccupiedEntry default type for S (#193)

This commit is contained in:
Stepan Koltsov 2022-04-27 13:16:25 +01:00 committed by GitHub
parent 3d315aa7a7
commit 5e794aa789
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -84,7 +84,7 @@ impl<'a, K: Eq + Hash, V, S: BuildHasher> Entry<'a, K, V, S> {
}
}
pub struct VacantEntry<'a, K, V, S> {
pub struct VacantEntry<'a, K, V, S = RandomState> {
shard: RwLockWriteGuard<'a, HashMap<K, V, S>>,
key: K,
}
@ -130,7 +130,7 @@ impl<'a, K: Eq + Hash, V, S: BuildHasher> VacantEntry<'a, K, V, S> {
}
}
pub struct OccupiedEntry<'a, K, V, S> {
pub struct OccupiedEntry<'a, K, V, S = RandomState> {
shard: RwLockWriteGuard<'a, HashMap<K, V, S>>,
elem: (*const K, *mut V),
key: K,