Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
Gankra committed Sep 27, 2014
1 parent c262c98 commit b576db6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libcollections/btree/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,13 +541,15 @@ mod stack {
// Walk into the smallest subtree of this node
let node = temp_node;
let node_ptr = node as *mut _;
self.stack.push((node_ptr, 0));

if node.is_leaf() {
// This node is a leaf, do the swap and return
self.top = (node_ptr, 0);
node.unsafe_swap(0, &mut *key_ptr, &mut *val_ptr);
break;
} else {
// This node is internal, go deeper
self.stack.push((node_ptr, 0));
temp_node = node.unsafe_edge_mut(0);
}
}
Expand Down

0 comments on commit b576db6

Please sign in to comment.