Skip to content

Commit

Permalink
refactor(parser): Remove function wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 12, 2022
1 parent 8cf6d11 commit 0f30ac7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/parser/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1503,11 +1503,6 @@ impl<'cmd> Parser<'cmd> {
matcher.start_custom_group(group, source);
}
}

/// Increase occurrence of specific argument and the grouped arg it's in.
fn start_occurrence_of_arg(&self, matcher: &mut ArgMatcher, arg: &Arg) {
self.start_custom_arg(matcher, arg, ValueSource::CommandLine);
}
}

// Error, Help, and Version Methods
Expand Down Expand Up @@ -1542,7 +1537,7 @@ impl<'cmd> Parser<'cmd> {
// Add the arg to the matches to build a proper usage string
if let Some((name, _)) = did_you_mean.as_ref() {
if let Some(arg) = self.cmd.get_keymap().get(&name.as_ref()) {
self.start_occurrence_of_arg(matcher, arg);
self.start_custom_arg(matcher, arg, ValueSource::CommandLine);
}
}

Expand Down

0 comments on commit 0f30ac7

Please sign in to comment.