MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / parse_flag

Function parse_flag

crates/openshell-supervisor-process/src/debug_rpc.rs:212–223  ·  view source on GitHub ↗
(args: &'a [String], name: &str)

Source from the content-addressed store, hash-verified

210}
211
212fn parse_flag<'a>(args: &'a [String], name: &str) -> Option<&'a str> {
213 let mut iter = args.iter();
214 while let Some(a) = iter.next() {
215 if a == name {
216 return iter.next().map(String::as_str);
217 }
218 if let Some(rest) = a.strip_prefix(&format!("{name}=")) {
219 return Some(rest);
220 }
221 }
222 None
223}
224
225fn code_name(c: tonic::Code) -> &'static str {
226 match c {

Callers 1

run_get_sandbox_configFunction · 0.85

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected