MCPcopy Create free account
hub / github.com/ccusage/ccusage / parse_shared_arg_for_command

Function parse_shared_arg_for_command

rust/crates/ccusage-cli/src/parser.rs:562–574  ·  view source on GitHub ↗
(
    parser: &mut ArgParser,
    shared: &mut SharedArgs,
)

Source from the content-addressed store, hash-verified

560}
561
562fn parse_shared_arg_for_command(
563 parser: &mut ArgParser,
564 shared: &mut SharedArgs,
565) -> Result<bool, String> {
566 let Some(arg) = parser.peek() else {
567 return Ok(false);
568 };
569 if is_shared_flag(arg) {
570 parse_shared_arg(parser, shared)?;
571 return Ok(true);
572 }
573 Ok(false)
574}
575
576fn parse_shared_arg(parser: &mut ArgParser, shared: &mut SharedArgs) -> Result<(), String> {
577 match parser.next_flag()?.as_str() {

Callers 8

parse_commandFunction · 0.85
parse_codex_commandFunction · 0.85
parse_pi_commandFunction · 0.85
parse_openclaw_commandFunction · 0.85

Calls 3

is_shared_flagFunction · 0.85
parse_shared_argFunction · 0.85
peekMethod · 0.80

Tested by

no test coverage detected