chore: clippy run

This commit is contained in:
Kevin K 2016-10-21 09:52:16 -04:00
parent e443f2d6c1
commit 2d2ec03995
No known key found for this signature in database
GPG key ID: 17218E4B3692F01A
5 changed files with 10 additions and 9 deletions

View file

@ -2,7 +2,7 @@ sudo: false
language: rust
rust:
- nightly
- nightly-2016-09-04
- nightly-2016-10-21
- beta
- stable
matrix:

View file

@ -24,7 +24,7 @@ ansi_term = { version = "~0.9.0", optional = true }
term_size = { version = "~0.2.0", optional = true }
libc = { version = "~0.2.9", optional = true }
yaml-rust = { version = "~0.3.2", optional = true }
clippy = { version = "~0.0.88", optional = true }
clippy = { version = "~0.0.95", optional = true }
[dev-dependencies]
regex = "~0.1.69"

View file

@ -508,7 +508,7 @@ impl<'a> Help<'a> {
}));
}
if !self.hide_pv && !a.is_set(ArgSettings::HidePossibleValues) {
if let Some(ref pv) = a.possible_vals() {
if let Some(pv) = a.possible_vals() {
debugln!("Found possible vals...{:?}", pv);
spec_vals.push(if self.color {
format!(" [values: {}]",

View file

@ -647,7 +647,7 @@ impl<'a, 'b> Parser<'a, 'b>
if sc.meta.bin_name != self.meta.bin_name {
sc.meta.bin_name = Some(format!("{} {}", bin_name, sc.meta.name));
}
return sc._help();
sc._help()
}
// The actual parsing function
@ -696,8 +696,8 @@ impl<'a, 'b> Parser<'a, 'b>
// Check to see if parsing a value from an option
if let Some(arg) = needs_val_of {
// get the OptBuilder so we can check the settings
if let Some(ref opt) = self.get_opt(&arg) {
needs_val_of = try!(self.add_val_to_arg(*opt, &arg_os, matcher));
if let Some(opt) = self.get_opt(arg) {
needs_val_of = try!(self.add_val_to_arg(&*opt, &arg_os, matcher));
// get the next value from the iterator
continue;
}

View file

@ -394,10 +394,11 @@
missing_debug_implementations,
missing_copy_implementations,
trivial_casts,
// trivial_numeric_casts, // While bitflags fails this lint
unused_import_braces,
unused_allocation,
unused_qualifications)]
unused_allocation)]
// Lints we'd like to deny but are currently failing for upstream crates
// unused_qualifications (bitflags, clippy)
// trivial_numeric_casts (bitflags)
#![cfg_attr(not(any(feature = "lints", feature = "nightly")), forbid(unstable_features))]
#![cfg_attr(feature = "lints", feature(plugin))]
#![cfg_attr(feature = "lints", plugin(clippy))]