MCPcopy Create free account
hub / github.com/douchuan/algorithm / find_min

Function find_min

src/tree/binary/bst.rs:122–127  ·  view source on GitHub ↗

# Safety This is highly unsafe, due to pointer

(node: Option<NonNull<Node<K, V>>>)

Source from the content-addressed store, hash-verified

120///
121/// This is highly unsafe, due to pointer
122pub unsafe fn find_min<K, V>(node: Option<NonNull<Node<K, V>>>) -> Option<NonNull<Node<K, V>>>
123where
124 K: Ord,
125{
126 node.and_then(|node| node.as_ref().left.map_or(Some(node), |l| find_min(Some(l))))
127}
128
129/// # Safety
130///

Callers 5

minMethod · 0.85
succFunction · 0.85
deleteFunction · 0.85
minMethod · 0.85
deleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected