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 43c1fa3 commit 84828e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions src/parser/arg_matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ impl ArgMatcher {
ma.new_val_group();
}

pub(crate) fn start_occurrence_of_arg(&mut self, arg: &Arg) {
self.start_custom_arg(arg, ValueSource::CommandLine);
}

pub(crate) fn start_occurrence_of_group(&mut self, id: Id) {
self.start_custom_group(id, ValueSource::CommandLine);
}

pub(crate) fn start_occurrence_of_external(&mut self, cmd: &crate::Command) {
let id = Id::from_static_ref(Id::EXTERNAL);
debug!("ArgMatcher::start_occurrence_of_external: id={:?}", id,);
Expand Down
4 changes: 2 additions & 2 deletions src/parser/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1509,10 +1509,10 @@ impl<'cmd> Parser<'cmd> {
// With each new occurrence, remove overrides from prior occurrences
self.remove_overrides(arg, matcher);

matcher.start_occurrence_of_arg(arg);
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_occurrence_of_group(group);
matcher.start_custom_group(group, ValueSource::CommandLine);
}
}
}
Expand Down

0 comments on commit 84828e8

Please sign in to comment.