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

Function collect_entries_owned

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

Source from the content-addressed store, hash-verified

135}
136
137pub(crate) fn collect_entries_owned(nodes: &[Node], node_idx: usize, result: &mut Vec<RTreeEntry>) {
138 match &nodes[node_idx].kind {
139 NodeKind::Leaf { entries } => result.extend(entries.iter().cloned()),
140 NodeKind::Internal { children } => {
141 for child in children {
142 collect_entries_owned(nodes, child.node_idx, result);
143 }
144 }
145 }
146}
147
148#[cfg(test)]
149mod tests {

Callers 1

delete_entryFunction · 0.85

Calls 2

extendMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected