(matches: &ArgMatches)
| 231 | } |
| 232 | |
| 233 | fn parse_registry_command(matches: &ArgMatches) -> Result<CliCommand, CliError> { |
| 234 | match matches.subcommand() { |
| 235 | Some(("get", _)) => Ok(CliCommand::RegistryGet {}), |
| 236 | Some(("unlock", _)) => Ok(CliCommand::RegistryUnlock {}), |
| 237 | _ => Err(CliError::CommandNotRecognized( |
| 238 | matches.subcommand().unwrap().0.into(), |
| 239 | )), |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | fn parse_webhook_command(matches: &ArgMatches) -> Result<CliCommand, CliError> { |
| 244 | match matches.subcommand() { |