MCPcopy Create free account
hub / github.com/PerroEngine/Perro / parse_multi_flag

Function parse_multi_flag

perro_source/devtools/perro_cli/src/bench.rs:75–87  ·  view source on GitHub ↗
(args: &[String], flag: &str)

Source from the content-addressed store, hash-verified

73}
74
75fn parse_multi_flag(args: &[String], flag: &str) -> Vec<String> {
76 let mut out = Vec::new();
77 let mut i = 0;
78 while i + 1 < args.len() {
79 if args[i] == flag {
80 out.push(args[i + 1].clone());
81 i += 2;
82 } else {
83 i += 1;
84 }
85 }
86 out
87}
88
89fn passthrough_args(args: &[String]) -> Vec<String> {
90 let Some(idx) = args.iter().position(|arg| arg == "--") else {

Callers 1

bench_commandFunction · 0.85

Calls 3

cloneMethod · 0.80
lenMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected