chore: clippy run

This commit is contained in:
Kevin K 2016-12-30 22:08:28 -05:00
parent fabe9267ee
commit c20701b74a
No known key found for this signature in database
GPG key ID: 17218E4B3692F01A
2 changed files with 5 additions and 6 deletions

View file

@ -460,7 +460,7 @@ impl<'a, 'b> Parser<'a, 'b>
// Determines if we need the `[FLAGS]` tag in the usage string
pub fn needs_flags_tag(&self) -> bool {
debugln!("Parser::needs_flags_tag;");
'outer: for f in self.flags.iter() {
'outer: for f in &self.flags {
debugln!("Parser::needs_flags_tag:iter: f={};", f.b.name);
if let Some(l) = f.s.long {
if l == "help" || l == "version" {
@ -1791,12 +1791,10 @@ impl<'a, 'b> Parser<'a, 'b>
// Validate the conditionally required args
for &(a, v, r) in &self.r_ifs {
if let Some(ref ma) = matcher.get(a) {
if let Some(ma) = matcher.get(a) {
for val in ma.vals.values() {
if v == val {
if matcher.get(r).is_none() {
return self.missing_required_error(matcher);
}
if v == val && matcher.get(r).is_none() {
return self.missing_required_error(matcher);
}
}
}

View file

@ -2966,6 +2966,7 @@ impl<'a, 'b> Arg<'a, 'b> {
/// ```
/// [`Arg::takes_value(true)`]: ./struct.Arg.html#method.takes_value
/// [`Arg::default_value`]: ./struct.Arg.html#method.default_value
#[cfg_attr(feature = "lints", allow(explicit_counter_loop))]
pub fn default_value_ifs(mut self, ifs: &[(&'a str, Option<&'b str>, &'b str)]) -> Self {
self.setb(ArgSettings::TakesValue);
if let Some(ref mut vm) = self.default_vals_ifs {