Skip to content

Commit f0c554d

Browse files
committed
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.
1 parent aa67e13 commit f0c554d

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/libstd/trie.rs

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,18 +111,6 @@ impl<T> TrieMap<T> {
111111
self.root.each_reverse(f)
112112
}
113113

114-
/// Visit all keys in reverse order
115-
#[inline]
116-
pub fn each_key_reverse(&self, f: |&uint| -> bool) -> bool {
117-
self.each_reverse(|k, _| f(k))
118-
}
119-
120-
/// Visit all values in reverse order
121-
#[inline]
122-
pub fn each_value_reverse(&self, f: |&T| -> bool) -> bool {
123-
self.each_reverse(|_, v| f(v))
124-
}
125-
126114
/// Get an iterator over the key-value pairs in the map
127115
pub fn iter<'a>(&'a self) -> TrieMapIterator<'a, T> {
128116
TrieMapIterator {
@@ -328,7 +316,7 @@ impl TrieSet {
328316
/// Visit all values in reverse order
329317
#[inline]
330318
pub fn each_reverse(&self, f: |&uint| -> bool) -> bool {
331-
self.map.each_key_reverse(f)
319+
self.map.each_reverse(|k, _| f(k))
332320
}
333321

334322
/// Get an iterator over the values in the set

0 commit comments

Comments
 (0)