Function blart::delete_maximum_unchecked
source · pub unsafe fn delete_maximum_unchecked<K, V>(
root: OpaqueNodePtr<K, V>
) -> DeleteResult<K, V>
Expand description
Find and delete the maximum leaf in the tree, returning the maximum
LeafNode
.
A well-formed tree is always guaranteed to have a maximum leaf. A well-formed tree:
- does not have any loops
- all inner nodes have at least 1 child
Safety
- The
root
OpaqueNodePtr
must be a unique pointer to the underlying tree - This function cannot be called concurrently to any reads or writes of the
root
node or any child node ofroot
. This function will arbitrarily read or write to any child in the given tree.