avoid explicit reborrow in heir_swap

This commit is contained in:
Daniel Micay 2013-02-10 21:11:33 -05:00
parent 195a969bb3
commit b0f58f6e68

View File

@ -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;