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.
This commit is contained in:
parent
aa67e13498
commit
f0c554d0d8
1 changed files with 1 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue