MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / count_nodes

Function count_nodes

crates/opencode-grep/src/search.rs:262–268  ·  view source on GitHub ↗
(node: &BTreeMap<String, TreeNode>)

Source from the content-addressed store, hash-verified

260}
261
262fn count_nodes(node: &BTreeMap<String, TreeNode>) -> usize {
263 let mut total = 0;
264 for child in node.values() {
265 total += 1 + count_nodes(&child.children);
266 }
267 total
268}
269
270mod glob_match {
271 use std::path::Path;

Callers 1

treeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected