Skip to content

Commit

Permalink
hashmap: Remove .mutate_values() which is replaced by .mut_iter()
Browse files Browse the repository at this point in the history
  • Loading branch information
blake2-ppc committed Jul 16, 2013
1 parent e844b52 commit cf4127f
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/libstd/hashmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,19 +510,6 @@ impl<K: Hash + Eq, V> HashMap<K, V> {
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> {
Expand Down

0 comments on commit cf4127f

Please sign in to comment.