From ca9caffa23892cdd935d335ef818fff4f73ecf27 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 12 Dec 2018 10:37:03 +0100 Subject: [PATCH] cleanup parameter types --- src/cli/command.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/command.rs b/src/cli/command.rs index f4fc977d..1f81a9aa 100644 --- a/src/cli/command.rs +++ b/src/cli/command.rs @@ -116,7 +116,7 @@ fn record_done_arguments(done: &mut HashSet, parameters: &ObjectSchema, fn print_simple_completion( cli_cmd: &CliCommand, - mut done: &mut HashSet, + done: &mut HashSet, arg_param: &[&str], mut args: Vec, ) { @@ -142,7 +142,7 @@ fn print_simple_completion( } if args.is_empty() { return; } - record_done_arguments(&mut done, &cli_cmd.info.parameters, &args); + record_done_arguments(done, &cli_cmd.info.parameters, &args); let prefix = args.pop().unwrap(); // match on last arg @@ -150,8 +150,8 @@ fn print_simple_completion( if !prefix.starts_with("-") && args.len() > 0 { let last = &args[args.len()-1]; if last.starts_with("--") && last.len() > 2 { - let prop_name = last[2..].to_owned(); - if let Some((_, schema)) = cli_cmd.info.parameters.properties.get::(&prop_name) { + let prop_name = &last[2..]; + if let Some((_, schema)) = cli_cmd.info.parameters.properties.get(prop_name) { print_property_completion(schema, &prefix); } return;