diff --git a/proxmox-api/src/cli.rs b/proxmox-api/src/cli.rs index d6676d92..166255ea 100644 --- a/proxmox-api/src/cli.rs +++ b/proxmox-api/src/cli.rs @@ -107,11 +107,7 @@ impl CliCommandMap { } /// Insert another command. - pub fn insert>( - mut self, - name: &'static str, - cli: C, - ) -> Self { + pub fn insert>(mut self, name: &'static str, cli: C) -> Self { self.commands.insert(name.into(), cli.into()); self } diff --git a/proxmox-api/src/cli/command.rs b/proxmox-api/src/cli/command.rs index 958dcc10..6e016398 100644 --- a/proxmox-api/src/cli/command.rs +++ b/proxmox-api/src/cli/command.rs @@ -212,7 +212,6 @@ pub fn handle_command( /// - ``printdoc``: Output ReST documentation. /// pub fn run_cli_command>(def: C) { - let def = match def.into() { CommandLineInterface::Simple(cli_cmd) => CommandLineInterface::Simple(cli_cmd), CommandLineInterface::Nested(map) => CommandLineInterface::Nested(map.insert_help()), diff --git a/proxmox-api/src/cli/completion.rs b/proxmox-api/src/cli/completion.rs index 838c7d4f..25935c9c 100644 --- a/proxmox-api/src/cli/completion.rs +++ b/proxmox-api/src/cli/completion.rs @@ -337,13 +337,11 @@ mod test { .insert("l0c1", CliCommand::new(&API_METHOD_SIMPLE1)) .insert( "l0c2", - CliCommand::new(&API_METHOD_SIMPLE1) - .arg_param(&["required-arg"]) + CliCommand::new(&API_METHOD_SIMPLE1).arg_param(&["required-arg"]), ) .insert( "l0c3", - CliCommand::new(&API_METHOD_SIMPLE1) - .arg_param(&["required-arg", "optional-arg"]) + CliCommand::new(&API_METHOD_SIMPLE1).arg_param(&["required-arg", "optional-arg"]), ); cmd_def.into()