From 8cf6d116e3e785714b8ecce648ff444f41321cf3 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Wed, 12 Oct 2022 07:31:09 -0500 Subject: [PATCH] refactor(parser): Reduce code duplication --- src/parser/parser.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/parser/parser.rs b/src/parser/parser.rs index 818ca95c98e..521c3eecd93 100644 --- a/src/parser/parser.rs +++ b/src/parser/parser.rs @@ -1506,14 +1506,7 @@ impl<'cmd> Parser<'cmd> { /// Increase occurrence of specific argument and the grouped arg it's in. fn start_occurrence_of_arg(&self, matcher: &mut ArgMatcher, arg: &Arg) { - // With each new occurrence, remove overrides from prior occurrences - self.remove_overrides(arg, matcher); - - matcher.start_custom_arg(arg, ValueSource::CommandLine); - // Increment or create the group "args" - for group in self.cmd.groups_for_arg(arg.get_id()) { - matcher.start_custom_group(group, ValueSource::CommandLine); - } + self.start_custom_arg(matcher, arg, ValueSource::CommandLine); } }