Auto merge of #31038 - gereeter:btree-panic, r=Gankro
…ving elements into it. Fixes #31029.
This commit is contained in:
commit
c4c9628de7
1 changed files with 2 additions and 2 deletions
|
|
@ -1027,6 +1027,8 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
|
|||
}
|
||||
self.node.as_leaf_mut().len -= 1;
|
||||
|
||||
left_node.as_leaf_mut().len += right_len as u16 + 1;
|
||||
|
||||
if self.node.height > 1 {
|
||||
ptr::copy_nonoverlapping(
|
||||
right_node.cast_unchecked().as_internal().edges.as_ptr(),
|
||||
|
|
@ -1058,8 +1060,6 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
|
|||
);
|
||||
}
|
||||
|
||||
left_node.as_leaf_mut().len += right_len as u16 + 1;
|
||||
|
||||
Handle::new_edge(self.node, self.idx)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue