Skip to content

Commit

Permalink
btree/node.rs: pop_internal_level: does not invalidate other handles
Browse files Browse the repository at this point in the history
  • Loading branch information
btj authored and gitbot committed Feb 20, 2025
1 parent 2e09211 commit 2072889
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions alloc/src/collections/btree/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,9 @@ impl<K, V> NodeRef<marker::Owned, K, V, marker::LeafOrInternal> {
/// no cleanup is done on any of the keys, values and other children.
/// This decreases the height by 1 and is the opposite of `push_internal_level`.
///
/// Does not invalidate any handles or references pointing into the subtree
/// rooted at the first child of `self`.
///
/// Panics if there is no internal level, i.e., if the root node is a leaf.
pub(super) fn pop_internal_level<A: Allocator + Clone>(&mut self, alloc: A) {
assert!(self.height > 0);
Expand Down

0 comments on commit 2072889

Please sign in to comment.