MCPcopy Create free account
hub / github.com/apache/datafusion / command_from_matches

Function command_from_matches

benchmarks/src/benchmark_runner/cli.rs:52–58  ·  view source on GitHub ↗

Converts clap matches into a typed command.

(matches: &ArgMatches)

Source from the content-addressed store, hash-verified

50
51/// Converts clap matches into a typed command.
52pub(crate) fn command_from_matches(matches: &ArgMatches) -> Result<RunnerCommand> {
53 match matches.subcommand() {
54 None | Some(("help", _)) => Ok(RunnerCommand::Help),
55 Some(("list", _)) => Ok(RunnerCommand::List),
56 Some((name, _)) => Err(exec_datafusion_err!("Unknown command '{name}'")),
57 }
58}
59
60#[cfg(test)]
61mod tests {

Callers 1

run_cliFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…