]> git.lizzy.rs Git - rust.git/commitdiff
hashmap: Remove .mutate_values() which is replaced by .mut_iter()
authorblake2-ppc <blake2-ppc>
Tue, 16 Jul 2013 01:55:52 +0000 (03:55 +0200)
committerblake2-ppc <blake2-ppc>
Tue, 16 Jul 2013 01:55:52 +0000 (03:55 +0200)
src/libstd/hashmap.rs

index 3b3b71d729735281acfb91ddf9479a4ba93e7538..0131c3b540a19b1170dfe02a41ea3a03454c1118 100644 (file)
@@ -510,19 +510,6 @@ pub fn each_value<'a>(&'a self, blk: &fn(v: &'a V) -> bool) -> bool {
         self.iter().advance(|(_, v)| blk(v))
     }
 
-    /// Iterate over the map and mutate the contained values
-    pub fn mutate_values(&mut self, blk: &fn(&K, &mut V) -> bool) -> bool {
-        for uint::range(0, self.buckets.len()) |i| {
-            match self.buckets[i] {
-              Some(Bucket{key: ref key, value: ref mut value, _}) => {
-                if !blk(key, value) { return false; }
-              }
-              None => ()
-            }
-        }
-        return true;
-    }
-
     /// An iterator visiting all key-value pairs in arbitrary order.
     /// Iterator element type is (&'a K, &'a V).
     pub fn iter<'a>(&'a self) -> HashMapIterator<'a, K, V> {