Skip to content

Commit dcdd2c4

Browse files
committed
38880 use search_mut function rather than search_hashed
1 parent 9bc5986 commit dcdd2c4

File tree

1 file changed

+1
-3
lines changed
  • src/libstd/collections/hash

1 file changed

+1
-3
lines changed

src/libstd/collections/hash/map.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -1039,9 +1039,7 @@ impl<K, V, S> HashMap<K, V, S>
10391039
pub fn entry(&mut self, key: K) -> Entry<K, V> {
10401040
// Gotta resize now.
10411041
self.reserve(1);
1042-
let hash = self.make_hash(&key);
1043-
search_hashed(&mut self.table, hash, |q| q.eq(&key))
1044-
.into_entry(key).expect("unreachable")
1042+
self.search_mut(&key).into_entry(key).expect("unreachable")
10451043
}
10461044

10471045
/// Returns the number of elements in the map.

0 commit comments

Comments
 (0)