clippy: collapsible_if
@@ -882,8 +882,7 @@ impl<'a, 'b> Parser<'a, 'b>
}
_ => (),
}
- } else {
- if arg_os.starts_with(b"--") {
+ } else if arg_os.starts_with(b"--") {
needs_val_of = try!(self.parse_long_arg(matcher, &arg_os));
debugln!("Parser:get_matches_with: After parse_long_arg {:?}",
needs_val_of);
@@ -917,7 +916,6 @@ impl<'a, 'b> Parser<'a, 'b>
_ => (),
}
}
- }
if !(self.is_set(AS::ArgsNegateSubcommands) && self.is_set(AS::ValidArgFound)) &&
!self.is_set(AS::InferSubcommands) {
@@ -1244,12 +1242,10 @@ impl<'a, 'b> Parser<'a, 'b>
if self.groups.iter().any(|g| &g.name == &*n) {
args.extend(self.arg_names_in_group(n));
g_vec.push(*n);
- } else {
- if !args.contains(n) {
+ } else if !args.contains(n) {
args.push(*n);
}
}
- }
args.iter().map(|s| *s).collect()
}
