(matches: &ArgMatches)
| 93 | } |
| 94 | |
| 95 | fn parse_config_command(matches: &ArgMatches) -> Result<CliCommand, CliError> { |
| 96 | match matches.subcommand() { |
| 97 | Some(("get", _)) => Ok(CliCommand::ConfigGet {}), |
| 98 | Some(("set", matches)) => Ok(CliCommand::ConfigSet { |
| 99 | admin: parse_pubkey("admin", matches).ok(), |
| 100 | epoch_thread: parse_pubkey("epoch_thread", matches).ok(), |
| 101 | hasher_thread: parse_pubkey("hasher_thread", matches).ok(), |
| 102 | }), |
| 103 | _ => Err(CliError::CommandNotRecognized( |
| 104 | matches.subcommand().unwrap().0.into(), |
| 105 | )), |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | fn parse_crontab_command(matches: &ArgMatches) -> Result<CliCommand, CliError> { |
| 110 | Ok(CliCommand::Crontab { |
no test coverage detected