Skip to content

Commit

Permalink
refactor: Remove dead code
Browse files Browse the repository at this point in the history
We are looping over the arguments set by the parser.  In one case, we
are checking to see if the argument is a group.  I am not seeing us set
groups in the matcher when parsing and we have a debug assert ensuring
arg and group names don't conflict.  This looks like dead code to me.

I am hesitant making a change like this right before release but this is
part of trying to make the code understandable for root causing and
fixing clap-rs#3197
  • Loading branch information
epage committed Dec 22, 2021
1 parent 90d4a3c commit 791d70d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/parse/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,15 +380,6 @@ impl<'help, 'app, 'parser> Validator<'help, 'app, 'parser> {
c.insert(g.id.clone());
}
}
} else if let Some(g) = self
.p
.app
.groups
.iter()
.find(|g| !g.multiple && g.id == *name)
{
debug!("Validator::gather_conflicts:iter:{:?}:group", name);
c.insert(g.id.clone());
}
});

Expand Down

0 comments on commit 791d70d

Please sign in to comment.