about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorShaun Steenkamp <theguywholikeslinux@gmail.com>2018-02-06 14:16:54 +0000
committerShaun Steenkamp <theguywholikeslinux@gmail.com>2018-02-06 15:43:34 +0000
commitdcdd2c42d3c7f6125583bcdf0c5ed7e1ef7086db (patch)
treebc44280321954e4010e91bd3201d8760f21be4c2 /src/libstd
parent9bc59865f1042b8c6f3a7c69f0d2643b37a41d75 (diff)
38880 use search_mut function rather than search_hashed
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/collections/hash/map.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs
index 74c4382f16a..04c9f617d01 100644
--- a/src/libstd/collections/hash/map.rs
+++ b/src/libstd/collections/hash/map.rs
@@ -1039,9 +1039,7 @@ impl<K, V, S> HashMap<K, V, S>
     pub fn entry(&mut self, key: K) -> Entry<K, V> {
         // Gotta resize now.
         self.reserve(1);
-        let hash = self.make_hash(&key);
-        search_hashed(&mut self.table, hash, |q| q.eq(&key))
-            .into_entry(key).expect("unreachable")
+        self.search_mut(&key).into_entry(key).expect("unreachable")
     }
 
     /// Returns the number of elements in the map.