about summary refs log tree commit diff
diff options
context:
space:
mode:
authorblake2-ppc <blake2-ppc>2013-08-07 16:59:17 +0200
committerCorey Richardson <corey@octayn.net>2013-08-07 22:39:57 -0400
commit026c1ae3113a6333bace9058d2d38cb7bc1c9cc8 (patch)
tree642118e7ff23070846bb5f4d81aed7b85d6cedb3
parenta85f9acbfce3d47cf05ce4dd33a06907df261d49 (diff)
downloadrust-026c1ae3113a6333bace9058d2d38cb7bc1c9cc8.tar.gz
rust-026c1ae3113a6333bace9058d2d38cb7bc1c9cc8.zip
extra: Remove all .each methods in smallintmap
-rw-r--r--src/libextra/smallintmap.rs43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/libextra/smallintmap.rs b/src/libextra/smallintmap.rs
index e5116f19afa..8103ed7a478 100644
--- a/src/libextra/smallintmap.rs
+++ b/src/libextra/smallintmap.rs
@@ -16,7 +16,6 @@
 #[allow(missing_doc)];
 
 use std::iterator::{Iterator, IteratorUtil, Enumerate, FilterMap, Invert};
-use std::uint;
 use std::util::replace;
 use std::vec::{VecIterator, VecMutIterator};
 use std::vec;
@@ -116,48 +115,6 @@ impl<V> SmallIntMap<V> {
     /// Create an empty SmallIntMap
     pub fn new() -> SmallIntMap<V> { SmallIntMap{v: ~[]} }
 
-    /// Visit all key-value pairs in order
-    pub fn each<'a>(&'a self, it: &fn(&uint, &'a V) -> bool) -> bool {
-        for i in range(0u, self.v.len()) {
-            match self.v[i] {
-              Some(ref elt) => if !it(&i, elt) { return false; },
-              None => ()
-            }
-        }
-        true
-    }
-
-    /// Visit all keys in order
-    pub fn each_key(&self, blk: &fn(key: &uint) -> bool) -> bool {
-        self.each(|k, _| blk(k))
-    }
-
-    /// Visit all values in order
-    pub fn each_value<'a>(&'a self, blk: &fn(value: &'a V) -> bool) -> bool {
-        self.each(|_, v| blk(v))
-    }
-
-    /// Iterate over the map and mutate the contained values
-    pub fn mutate_values(&mut self, it: &fn(&uint, &mut V) -> bool) -> bool {
-        for i in range(0, self.v.len()) {
-            match self.v[i] {
-              Some(ref mut elt) => if !it(&i, elt) { return false; },
-              None => ()
-            }
-        }
-        true
-    }
-
-    /// Visit all key-value pairs in reverse order
-    pub fn each_reverse<'a>(&'a self, it: &fn(uint, &'a V) -> bool) -> bool {
-        do uint::range_rev(self.v.len(), 0) |i| {
-            match self.v[i] {
-              Some(ref elt) => it(i, elt),
-              None => true
-            }
-        }
-    }
-
     pub fn get<'a>(&'a self, key: &uint) -> &'a V {
         self.find(key).expect("key not present")
     }