about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-02-10 21:11:33 -0500
committerDaniel Micay <danielmicay@gmail.com>2013-02-10 21:11:33 -0500
commitb0f58f6e684ca9076fac99e8f3917d01eeb5775e (patch)
treef78ba8895f0d8061e9b6d131f7224b5448fd642d
parent195a969bb3e42e82e647e6ffead557f29884ff41 (diff)
downloadrust-b0f58f6e684ca9076fac99e8f3917d01eeb5775e.tar.gz
rust-b0f58f6e684ca9076fac99e8f3917d01eeb5775e.zip
avoid explicit reborrow in heir_swap
-rw-r--r--src/libstd/treemap.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/treemap.rs b/src/libstd/treemap.rs
index 4b02a13583f..c100d8ca85d 100644
--- a/src/libstd/treemap.rs
+++ b/src/libstd/treemap.rs
@@ -631,7 +631,7 @@ fn remove<K: Ord, V>(node: &mut Option<~TreeNode<K, V>>, key: &K) -> bool {
         // *could* be done without recursion, but it won't borrow check
         do child.mutate |mut child| {
             if child.right.is_some() {
-                heir_swap(&mut *node, &mut child.right);
+                heir_swap(node, &mut child.right);
             } else {
                 node.key <-> child.key;
                 node.value <-> child.value;