about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorHuon Wilson <dbau.pp+github@gmail.com>2014-01-12 21:35:12 +1100
committerHuon Wilson <dbau.pp+github@gmail.com>2014-01-18 10:45:34 +1100
commitf0c554d0d87bd2c9e33c72d126f506716dd1b5d1 (patch)
tree642c1cd4cb4a47b3cf76daa49472a44ad270d0c8 /src/libstd
parentaa67e13498936c42581f70daaf3b6d028426dde6 (diff)
downloadrust-f0c554d0d87bd2c9e33c72d126f506716dd1b5d1.tar.gz
rust-f0c554d0d87bd2c9e33c72d126f506716dd1b5d1.zip
std::trie: remove each_{key,value}_reverse internal iterators.
This are *trivial* to reimplement in terms of each_reverse if that extra
little bit of performance is needed.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/trie.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/libstd/trie.rs b/src/libstd/trie.rs
index d8df84bbba8..b9a67129af9 100644
--- a/src/libstd/trie.rs
+++ b/src/libstd/trie.rs
@@ -111,18 +111,6 @@ impl<T> TrieMap<T> {
         self.root.each_reverse(f)
     }
 
-    /// Visit all keys in reverse order
-    #[inline]
-    pub fn each_key_reverse(&self, f: |&uint| -> bool) -> bool {
-        self.each_reverse(|k, _| f(k))
-    }
-
-    /// Visit all values in reverse order
-    #[inline]
-    pub fn each_value_reverse(&self, f: |&T| -> bool) -> bool {
-        self.each_reverse(|_, v| f(v))
-    }
-
     /// Get an iterator over the key-value pairs in the map
     pub fn iter<'a>(&'a self) -> TrieMapIterator<'a, T> {
         TrieMapIterator {
@@ -328,7 +316,7 @@ impl TrieSet {
     /// Visit all values in reverse order
     #[inline]
     pub fn each_reverse(&self, f: |&uint| -> bool) -> bool {
-        self.map.each_key_reverse(f)
+        self.map.each_reverse(|k, _| f(k))
     }
 
     /// Get an iterator over the values in the set