about summary refs log tree commit diff
path: root/src/libstd/smallintmap.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-05-19 19:46:54 -0700
committerBrian Anderson <banderson@mozilla.com>2013-05-19 23:34:32 -0700
commit66319b027888ceddf024a5919e007caceaf369f3 (patch)
treed210e635c950974972a086f7caa4268be6f33c93 /src/libstd/smallintmap.rs
parent3a481c0f88025318eba7c48907a5c1d966e01d27 (diff)
downloadrust-66319b027888ceddf024a5919e007caceaf369f3.tar.gz
rust-66319b027888ceddf024a5919e007caceaf369f3.zip
Register snapshots
Diffstat (limited to 'src/libstd/smallintmap.rs')
-rw-r--r--src/libstd/smallintmap.rs48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/libstd/smallintmap.rs b/src/libstd/smallintmap.rs
index a336bd54a61..3c1f53b25f7 100644
--- a/src/libstd/smallintmap.rs
+++ b/src/libstd/smallintmap.rs
@@ -51,18 +51,6 @@ impl<V> Map<uint, V> for SmallIntMap<V> {
     }
 
     /// Visit all key-value pairs in order
-    #[cfg(stage0)]
-    fn each<'a>(&'a self, it: &fn(&uint, &'a V) -> bool) {
-        for uint::range(0, self.v.len()) |i| {
-            match self.v[i] {
-              Some(ref elt) => if !it(&i, elt) { break },
-              None => ()
-            }
-        }
-    }
-
-    /// Visit all key-value pairs in order
-    #[cfg(not(stage0))]
     fn each<'a>(&'a self, it: &fn(&uint, &'a V) -> bool) -> bool {
         for uint::range(0, self.v.len()) |i| {
             match self.v[i] {
@@ -74,40 +62,16 @@ impl<V> Map<uint, V> for SmallIntMap<V> {
     }
 
     /// Visit all keys in order
-    #[cfg(stage0)]
-    fn each_key(&self, blk: &fn(key: &uint) -> bool) {
-        self.each(|k, _| blk(k))
-    }
-    #[cfg(not(stage0))]
-    /// Visit all keys in order
     fn each_key(&self, blk: &fn(key: &uint) -> bool) -> bool {
         self.each(|k, _| blk(k))
     }
 
     /// Visit all values in order
-    #[cfg(stage0)]
-    fn each_value<'a>(&'a self, blk: &fn(value: &'a V) -> bool) {
-        self.each(|_, v| blk(v))
-    }
-
-    /// Visit all values in order
-    #[cfg(not(stage0))]
     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
-    #[cfg(stage0)]
-    fn mutate_values(&mut self, it: &fn(&uint, &mut V) -> bool) {
-        for uint::range(0, self.v.len()) |i| {
-            match self.v[i] {
-              Some(ref mut elt) => if !it(&i, elt) { return; },
-              None => ()
-            }
-        }
-    }
-    /// Iterate over the map and mutate the contained values
-    #[cfg(not(stage0))]
     fn mutate_values(&mut self, it: &fn(&uint, &mut V) -> bool) -> bool {
         for uint::range(0, self.v.len()) |i| {
             match self.v[i] {
@@ -187,18 +151,6 @@ pub impl<V> SmallIntMap<V> {
     fn new() -> SmallIntMap<V> { SmallIntMap{v: ~[]} }
 
     /// Visit all key-value pairs in reverse order
-    #[cfg(stage0)]
-    fn each_reverse<'a>(&'a self, it: &fn(uint, &'a V) -> bool) {
-        for uint::range_rev(self.v.len(), 0) |i| {
-            match self.v[i - 1] {
-              Some(ref elt) => if !it(i - 1, elt) { break },
-              None => ()
-            }
-        }
-    }
-
-    /// Visit all key-value pairs in reverse order
-    #[cfg(not(stage0))]
     fn each_reverse<'a>(&'a self, it: &fn(uint, &'a V) -> bool) -> bool {
         for uint::range_rev(self.v.len(), 0) |i| {
             match self.v[i - 1] {