Skip to content

Commit

Permalink
Fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ldm0 committed Jan 23, 2021
1 parent 63e9db2 commit 46d9352
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/output/usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,16 @@ impl<'help, 'app, 'parser> Usage<'help, 'app, 'parser> {
.filter(|pos| !pos.is_set(ArgSettings::Last))
{
debug!("Usage::get_args_tag:iter:{}", pos.name);
if !self.p.app.groups_for_arg(&pos.id).any(|grp_s| {
let required = self.p.app.groups_for_arg(&pos.id).any(|grp_s| {
debug!("Usage::get_args_tag:iter:{:?}:iter:{:?}", pos.name, grp_s);
// if it's part of a required group we don't want to count it
self.p
.app
.groups
.iter()
.any(|g| g.required && (g.id == grp_s))
}) {
});
if !required {
count += 1;
debug!(
"Usage::get_args_tag:iter: {} Args not required or hidden",
Expand Down

0 comments on commit 46d9352

Please sign in to comment.