avoid explicit reborrow in heir_swap
This commit is contained in:
parent
195a969bb3
commit
b0f58f6e68
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue