Skip to content

Commit 810e4c1

Browse files
authored
btree/node.rs: pop_internal_level: does not invalidate other handles
1 parent 6763561 commit 810e4c1

File tree

1 file changed

+3
-0
lines changed
  • library/alloc/src/collections/btree

1 file changed

+3
-0
lines changed

Diff for: library/alloc/src/collections/btree/node.rs

+3
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,9 @@ impl<K, V> NodeRef<marker::Owned, K, V, marker::LeafOrInternal> {
600600
/// no cleanup is done on any of the keys, values and other children.
601601
/// This decreases the height by 1 and is the opposite of `push_internal_level`.
602602
///
603+
/// Does not invalidate any handles or references pointing into the subtree
604+
/// rooted at the first child of `self`.
605+
///
603606
/// Panics if there is no internal level, i.e., if the root node is a leaf.
604607
pub(super) fn pop_internal_level<A: Allocator + Clone>(&mut self, alloc: A) {
605608
assert!(self.height > 0);

0 commit comments

Comments
 (0)