MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / collect_entries

Function collect_entries

nodedb-spatial/src/rtree/tree.rs:126–135  ·  view source on GitHub ↗
(nodes: &'a [Node], node_idx: usize, result: &mut Vec<&'a RTreeEntry>)

Source from the content-addressed store, hash-verified

124}
125
126fn collect_entries<'a>(nodes: &'a [Node], node_idx: usize, result: &mut Vec<&'a RTreeEntry>) {
127 match &nodes[node_idx].kind {
128 NodeKind::Leaf { entries } => result.extend(entries.iter()),
129 NodeKind::Internal { children } => {
130 for child in children {
131 collect_entries(nodes, child.node_idx, result);
132 }
133 }
134 }
135}
136
137pub(crate) fn collect_entries_owned(nodes: &[Node], node_idx: usize, result: &mut Vec<RTreeEntry>) {
138 match &nodes[node_idx].kind {

Callers 1

entriesMethod · 0.85

Calls 2

extendMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected