MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / collect

Function collect

src/cli/parse_tests.rs:15–22  ·  view source on GitHub ↗
(command: &Command, prefix: Vec<String>, paths: &mut Vec<Vec<String>>)

Source from the content-addressed store, hash-verified

13
14fn visible_subcommand_paths(command: &Command) -> Vec<Vec<String>> {
15 fn collect(command: &Command, prefix: Vec<String>, paths: &mut Vec<Vec<String>>) {
16 for subcommand in command.get_subcommands().filter(|sub| !sub.is_hide_set()) {
17 let mut path = prefix.clone();
18 path.push(subcommand.get_name().to_string());
19 paths.push(path.clone());
20 collect(subcommand, path, paths);
21 }
22 }
23
24 let mut paths = Vec::new();
25 collect(command, Vec::new(), &mut paths);

Callers 2

visible_subcommand_pathsFunction · 0.70
handle_runtimeFunction · 0.50

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected