1
Fork 0

re-borrow in heir_swap (fixes compile)

This commit is contained in:
Daniel Micay 2013-01-17 19:05:23 -05:00 committed by Graydon Hoare
parent f7d9485331
commit c7abdd3847

View file

@ -523,7 +523,7 @@ fn remove<K: Ord, V>(node: &mut Option<~TreeNode<K, V>>, key: &K) -> bool {
do child.mutate |child| {
let mut child = child;
if child.right.is_some() {
heir_swap(node, &mut child.right);
heir_swap(&mut *node, &mut child.right);
} else {
node.key <-> child.key;
node.value <-> child.value;