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(node: &mut Option<~TreeNode>, 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;