(matches: &ArgMatches)
| 156 | } |
| 157 | |
| 158 | fn parse_pool_command(matches: &ArgMatches) -> Result<CliCommand, CliError> { |
| 159 | match matches.subcommand() { |
| 160 | Some(("get", matches)) => Ok(CliCommand::PoolGet { |
| 161 | id: parse_u64("id", matches)?, |
| 162 | }), |
| 163 | Some(("update", matches)) => Ok(CliCommand::PoolUpdate { |
| 164 | id: parse_u64("id", matches)?, |
| 165 | size: parse_usize("size", matches)?, |
| 166 | }), |
| 167 | Some(("list", _)) => Ok(CliCommand::PoolList {}), |
| 168 | _ => Err(CliError::CommandNotRecognized( |
| 169 | matches.subcommand().unwrap().0.into(), |
| 170 | )), |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | fn parse_secret_command(matches: &ArgMatches) -> Result<CliCommand, CliError> { |
| 175 | match matches.subcommand() { |
no test coverage detected