diff options
| author | bors <bors@rust-lang.org> | 2013-08-03 13:40:49 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-03 13:40:49 -0700 |
| commit | 18e3db7392d2d0697b7e27d6d986139960144d85 (patch) | |
| tree | 2d5f263ee10b057c95f5eab38bccc5eb065d6b25 /src/libstd/hashmap.rs | |
| parent | b5d77d20ec2db9fbb3ba4b7a670e406bc2dc2206 (diff) | |
| parent | cf9e9b21d59eaf6f4d57904ef882a654caa37085 (diff) | |
auto merge of #8246 : stepancheg/rust/contains-key, r=thestinger
Map::contains_key can be implemented with Map::find. Remove several implementations of contains_key.
Diffstat (limited to 'src/libstd/hashmap.rs')
| -rw-r--r-- | src/libstd/hashmap.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/libstd/hashmap.rs b/src/libstd/hashmap.rs index 4de5d316fc0..74cff989c45 100644 --- a/src/libstd/hashmap.rs +++ b/src/libstd/hashmap.rs @@ -272,14 +272,6 @@ impl<K:Hash + Eq,V> Mutable for HashMap<K, V> { } impl<K:Hash + Eq,V> Map<K, V> for HashMap<K, V> { - /// Return true if the map contains a value for the specified key - fn contains_key(&self, k: &K) -> bool { - match self.bucket_for_key(k) { - FoundEntry(_) => {true} - TableFull | FoundHole(_) => {false} - } - } - /// Return a reference to the value corresponding to the key fn find<'a>(&'a self, k: &K) -> Option<&'a V> { match self.bucket_for_key(k) { |
