直接子节点个数,不包括孙子...
(node: NonNull<Self>)
| 68 | |
| 69 | /// 直接子节点个数,不包括孙子... |
| 70 | pub fn children_count(node: NonNull<Self>) -> usize { |
| 71 | unsafe { node.as_ref().left.map_or(0, |_| 1) + node.as_ref().right.map_or(0, |_| 1) } |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | // relation |
nothing calls this directly
no outgoing calls
no test coverage detected