From e3e72546ddb412d9e0266b5b103386bde95aa22d Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 2 Dec 2019 08:47:03 +0100 Subject: [PATCH] src/cli/command.rs: cleanup, remove unused top_def parameter --- src/cli/command.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/cli/command.rs b/src/cli/command.rs index 857194f4..01562da0 100644 --- a/src/cli/command.rs +++ b/src/cli/command.rs @@ -26,7 +26,6 @@ pub const OUTPUT_FORMAT: Schema = .schema(); fn handle_simple_command( - _top_def: &CommandLineInterface, prefix: &str, cli_cmd: &CliCommand, args: Vec, @@ -76,7 +75,6 @@ fn handle_simple_command( } fn handle_nested_command( - top_def: &CommandLineInterface, prefix: &str, def: &CliCommandMap, mut args: Vec, @@ -112,10 +110,10 @@ fn handle_nested_command( match sub_cmd { CommandLineInterface::Simple(cli_cmd) => { - handle_simple_command(top_def, &new_prefix, cli_cmd, args)?; + handle_simple_command(&new_prefix, cli_cmd, args)?; } CommandLineInterface::Nested(map) => { - handle_nested_command(top_def, &new_prefix, map, args)?; + handle_nested_command(&new_prefix, map, args)?; } } @@ -197,10 +195,10 @@ pub fn handle_command( let result = match &*def { CommandLineInterface::Simple(ref cli_cmd) => { - handle_simple_command(&def, &prefix, &cli_cmd, args) + handle_simple_command(&prefix, &cli_cmd, args) } CommandLineInterface::Nested(ref map) => { - handle_nested_command(&def, &prefix, &map, args) + handle_nested_command(&prefix, &map, args) } };