mirror of
https://github.com/clap-rs/clap
synced 2024-11-10 14:54:15 +00:00
chore: clippy run
This commit is contained in:
parent
e443f2d6c1
commit
2d2ec03995
5 changed files with 10 additions and 9 deletions
|
@ -2,7 +2,7 @@ sudo: false
|
|||
language: rust
|
||||
rust:
|
||||
- nightly
|
||||
- nightly-2016-09-04
|
||||
- nightly-2016-10-21
|
||||
- beta
|
||||
- stable
|
||||
matrix:
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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: {}]",
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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))]
|
||||
|
|
Loading…
Reference in a new issue