From f1fcdff9a3f10d0a52d487bd9ded4b6d700071fc Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 12 Dec 2019 15:35:30 +0100 Subject: [PATCH] formatting fixup Signed-off-by: Wolfgang Bumiller --- proxmox-api/src/cli.rs | 6 +----- proxmox-api/src/cli/command.rs | 1 - proxmox-api/src/cli/completion.rs | 6 ++---- 3 files changed, 3 insertions(+), 10 deletions(-) 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()