about summary refs log tree commit diff
path: root/src/libstd/treemap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/treemap.rs')
-rw-r--r--src/libstd/treemap.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libstd/treemap.rs b/src/libstd/treemap.rs
index cf863217deb..88e4ade4b82 100644
--- a/src/libstd/treemap.rs
+++ b/src/libstd/treemap.rs
@@ -207,8 +207,8 @@ pub struct TreeMapIterator<K, V> {
 /// Advance the iterator to the next node (in order) and return a
 /// tuple with a reference to the key and value. If there are no
 /// more nodes, return `None`.
-fn map_next<K: Ord, V>(iter: &mut TreeMapIterator/&r<K, V>)
-                    -> Option<(&r/K, &r/V)> {
+pub fn map_next<K: Ord, V>(iter: &mut TreeMapIterator/&r<K, V>)
+                        -> Option<(&r/K, &r/V)> {
     while !iter.stack.is_empty() || iter.node.is_some() {
         match *iter.node {
           Some(ref x) => {
@@ -226,7 +226,7 @@ fn map_next<K: Ord, V>(iter: &mut TreeMapIterator/&r<K, V>)
 }
 
 /// Advance the iterator through the map
-fn map_advance<K: Ord, V>(iter: &mut TreeMapIterator/&r<K, V>,
+pub fn map_advance<K: Ord, V>(iter: &mut TreeMapIterator/&r<K, V>,
                           f: fn((&r/K, &r/V)) -> bool) {
     loop {
         match map_next(iter) {
@@ -683,7 +683,11 @@ fn remove<K:Ord,V>(node: &mut Option<~TreeNode<K, V>>, key: &K) -> bool {
 #[cfg(test)]
 mod test_treemap {
     use super::*;
+    use core::cmp::{Ord, Eq};
+    use core::option::{Some, Option, None};
+    use core::rand;
     use core::str;
+    use core::vec;
 
     #[test]
     fn find_empty() {