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

Function take_value

src/tool_command/args.rs:699–703  ·  view source on GitHub ↗

Consume the next argument as a flag value or return a `missing value` error.

(iter: &mut std::slice::Iter<'_, String>, flag: &str)

Source from the content-addressed store, hash-verified

697
698/// Consume the next argument as a flag value or return a `missing value` error.
699fn take_value(iter: &mut std::slice::Iter<'_, String>, flag: &str) -> Result<String> {
700 iter.next().cloned().ok_or_else(|| TraceDecayError::Config {
701 message: format!("flag `{flag}` requires a value"),
702 })
703}
704
705fn take_flag_value(
706 iter: &mut std::slice::Iter<'_, String>,

Callers 1

take_flag_valueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected