# Safety This is highly unsafe, due to pointer
(node: Option<NonNull<Node<K, V>>>, key: &K)
| 106 | /// |
| 107 | /// This is highly unsafe, due to pointer |
| 108 | pub unsafe fn find<K, V>(node: Option<NonNull<Node<K, V>>>, key: &K) -> Option<NonNull<Node<K, V>>> |
| 109 | where |
| 110 | K: Ord, |
| 111 | { |
| 112 | node.and_then(|node| match node.as_ref().key.cmp(key) { |
| 113 | Ordering::Less => find(node.as_ref().right, key), |
| 114 | Ordering::Greater => find(node.as_ref().left, key), |
| 115 | Ordering::Equal => Some(node), |
| 116 | }) |
| 117 | } |
| 118 | |
| 119 | /// # Safety |
| 120 | /// |