about summary refs log tree commit diff
path: root/src/libcore/trie.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libcore/trie.rs')
-rw-r--r--src/libcore/trie.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libcore/trie.rs b/src/libcore/trie.rs
index 007bafcd03d..5921ae5b3f5 100644
--- a/src/libcore/trie.rs
+++ b/src/libcore/trie.rs
@@ -111,6 +111,12 @@ impl<T> Map<uint, T> for TrieMap<T> {
         }
     }
 
+    /// Return a mutable reference to the value corresponding to the key
+    #[inline(always)]
+    fn find_mut(&mut self, key: &uint) -> Option<&'self mut T> {
+        find_mut(&mut self.root.children[chunk(*key, 0)], *key, 1)
+    }
+
     /// Insert a key-value pair into the map. An existing value for a
     /// key is replaced by the new value. Return true if the key did
     /// not already exist in the map.
@@ -153,12 +159,6 @@ pub impl<T> TrieMap<T> {
     fn each_value_reverse(&self, f: &fn(&T) -> bool) {
         self.each_reverse(|&(_, v)| f(v))
     }
-
-    /// Return a mutable reference to the value corresponding to the key
-    #[inline(always)]
-    fn find_mut(&mut self, key: &uint) -> Option<&'self mut T> {
-        find_mut(&mut self.root.children[chunk(*key, 0)], *key, 1)
-    }
 }
 
 pub struct TrieSet {