MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / ctx_list

Function ctx_list

atomic-cli/src/agent_error.rs:216–224  ·  view source on GitHub ↗
(err: &clap::Error, kind: ContextKind)

Source from the content-addressed store, hash-verified

214}
215
216fn ctx_list(err: &clap::Error, kind: ContextKind) -> Vec<String> {
217 match err.get(kind) {
218 Some(ContextValue::Strings(v)) => v.clone(),
219 Some(ContextValue::String(s)) => vec![s.clone()],
220 Some(ContextValue::StyledStrs(v)) => v.iter().map(|s| s.to_string()).collect(),
221 Some(ContextValue::StyledStr(s)) => vec![s.to_string()],
222 _ => Vec::new(),
223 }
224}
225
226fn ctx_number(err: &clap::Error, kind: ContextKind) -> Option<isize> {
227 match err.get(kind) {

Callers 1

renderFunction · 0.85

Calls 3

getMethod · 0.65
cloneMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected