diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-02-03 17:12:33 -0500 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-02-03 18:20:59 -0500 |
| commit | 4fd9264875c0e0ee450316e8fbf15977d8978a74 (patch) | |
| tree | f569ed797bd1794d36c1b25cee36be4712451cbe /src/libstd | |
| parent | 119c78073b6a0ab62b90d05d12eac58af2a5cfb4 (diff) | |
| download | rust-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.rs | 6 |
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; } |
