# Safety This is highly unsafe, due to pointer
(node: Option<NonNull<Node<K, V>>>)
| 130 | /// |
| 131 | /// This is highly unsafe, due to pointer |
| 132 | pub unsafe fn find_max<K, V>(node: Option<NonNull<Node<K, V>>>) -> Option<NonNull<Node<K, V>>> |
| 133 | where |
| 134 | K: Ord, |
| 135 | { |
| 136 | node.and_then(|node| { |
| 137 | node.as_ref() |
| 138 | .right |
| 139 | .map_or(Some(node), |r| find_max(Some(r))) |
| 140 | }) |
| 141 | } |
| 142 | |
| 143 | /// # Safety |
| 144 | /// |