about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-02-03 17:12:33 -0500
committerDaniel Micay <danielmicay@gmail.com>2013-02-03 18:20:59 -0500
commit4fd9264875c0e0ee450316e8fbf15977d8978a74 (patch)
treef569ed797bd1794d36c1b25cee36be4712451cbe /src/libstd
parent119c78073b6a0ab62b90d05d12eac58af2a5cfb4 (diff)
downloadrust-4fd9264875c0e0ee450316e8fbf15977d8978a74.tar.gz
rust-4fd9264875c0e0ee450316e8fbf15977d8978a74.zip
oldmap: &K instead of K for the remove parameter
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/oldmap.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/oldmap.rs b/src/libstd/oldmap.rs
index adfc8854443..8e76cc6a7d2 100644
--- a/src/libstd/oldmap.rs
+++ b/src/libstd/oldmap.rs
@@ -299,8 +299,8 @@ pub mod chained {
             option::unwrap(move opt_v)
         }
 
-        fn remove(k: K) -> bool {
-            match self.search_tbl(&k, k.hash_keyed(0,0) as uint) {
+        fn remove(k: &K) -> bool {
+            match self.search_tbl(k, k.hash_keyed(0,0) as uint) {
               NotFound => false,
               FoundFirst(idx, entry) => {
                 self.count -= 1u;
@@ -578,7 +578,7 @@ mod tests {
         debug!("removing evens");
         i = 0u;
         while i < num_to_insert {
-            let v = hm.remove(i);
+            let v = hm.remove(&i);
             assert v;
             i += 2u;
         }