Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/douchuan/algorithm
/ is_leaf
Method
is_leaf
src/tree/binary/node.rs:239–242 ·
view source on GitHub ↗
(&self)
Source
from the content-addressed store, hash-verified
237
}
238
239
pub fn is_leaf(&self) -> bool {
240
self.node
241
.map_or(true, |node| Node::children_count(node) == 0)
242
}
243
244
pub fn is_branch(&self) -> bool {
245
!self.is_leaf()
Callers
1
is_branch
Method · 0.80
Calls
no outgoing calls
Tested by
no test coverage detected