diff options
| author | Stepan Koltsov <stepan.koltsov@gmail.com> | 2013-08-03 05:54:05 +0400 |
|---|---|---|
| committer | Stepan Koltsov <stepan.koltsov@gmail.com> | 2013-08-03 05:54:05 +0400 |
| commit | cf9e9b21d59eaf6f4d57904ef882a654caa37085 (patch) | |
| tree | 58a993b3762edb78f849bfd871f60339089d49a7 /src/libextra/smallintmap.rs | |
| parent | 3ddc72f69be4d0a2027ff598ad262ea2b2ca3812 (diff) | |
Add default implementation of Map::contains_key function
Map::contains_key can be implemented with Map::find. Remove several implementations of contains_key.
Diffstat (limited to 'src/libextra/smallintmap.rs')
| -rw-r--r-- | src/libextra/smallintmap.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/libextra/smallintmap.rs b/src/libextra/smallintmap.rs index e939f42ac90..cbcb6adcbb0 100644 --- a/src/libextra/smallintmap.rs +++ b/src/libextra/smallintmap.rs @@ -46,11 +46,6 @@ impl<V> Mutable for SmallIntMap<V> { } impl<V> Map<uint, V> for SmallIntMap<V> { - /// Return true if the map contains a value for the specified key - fn contains_key(&self, key: &uint) -> bool { - self.find(key).is_some() - } - /// Return a reference to the value corresponding to the key fn find<'a>(&'a self, key: &uint) -> Option<&'a V> { if *key < self.v.len() { |
