From 2bc542d60feecc35e75c5faa4d28ff3da3cd4de9 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 31 May 2022 16:31:31 -0500 Subject: [PATCH] refactor(parser): Clarify intent of push_arg_values --- src/parser/parser.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 4f5a5fca524..61b17eacf13 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1070,13 +1070,13 @@ impl<'help, 'cmd> Parser<'help, 'cmd> { } } - fn store_arg_values( + fn push_arg_values( &self, arg: &Arg<'help>, raw_vals: Vec, matcher: &mut ArgMatcher, ) -> ClapResult<()> { - debug!("Parser::store_arg_values: {:?}", raw_vals); + debug!("Parser::push_arg_values: {:?}", raw_vals); for raw_val in raw_vals { // update the current index because each value is a distinct index to clap @@ -1154,7 +1154,7 @@ impl<'help, 'cmd> Parser<'help, 'cmd> { } else { self.start_custom_arg(matcher, arg, source); } - self.store_arg_values(arg, raw_vals, matcher)?; + self.push_arg_values(arg, raw_vals, matcher)?; if ident == Some(Identifier::Index) && arg.is_multiple_values_set() { // HACK: Maintain existing occurrence behavior let matched = matcher.get_mut(&arg.id).unwrap(); @@ -1337,7 +1337,7 @@ impl<'help, 'cmd> Parser<'help, 'cmd> { } } self.start_custom_arg(matcher, arg, ValueSource::CommandLine); - self.store_arg_values(arg, arg_values, matcher)?; + self.push_arg_values(arg, arg_values, matcher)?; } None => { debug!("Parser::add_default_value:iter:{}: wasn't used", arg.name);