Skip to content

Commit

Permalink
Resolve a TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm0 committed Jan 30, 2021
1 parent cf48811 commit 45753d5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/parse/arg_matcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ impl ArgMatcher {

pub(crate) fn add_val_to(&mut self, arg: &Id, val: OsString, ty: ValueType) {
let ma = self.entry(arg).or_insert(MatchedArg {
occurs: 0, // @TODO @question Shouldn't this be 1 if we're already adding a value to this arg?
// We will manually inc occurrences later(for flexibility under
// specific circumstances, like only add one occurrence for flag
// when we met: `--flag=one,two`).
occurs: 0,
ty,
indices: Vec::with_capacity(1),
vals: Vec::with_capacity(1),
Expand Down

0 comments on commit 45753d5

Please sign in to comment.