Skip to content

Commit

Permalink
chore: updates clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Nov 7, 2015
1 parent 2b6d1dc commit 111745c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/app.rs
Expand Up @@ -1652,6 +1652,7 @@ impl<'a, 'v, 'ab, 'u, 'h, 'ar> App<'a, 'v, 'ab, 'u, 'h, 'ar>{
}

// The actual parsing function
#[cfg_attr(feature="lints", allow(while_let_on_iterator))]
fn get_matches_with<I, T>(&mut self,
matches: &mut ArgMatches<'ar, 'ar>,
it: &mut I,
Expand Down
2 changes: 1 addition & 1 deletion src/macros.rs
Expand Up @@ -136,7 +136,7 @@ macro_rules! print_opt_help {
if let Some(part) = hel.next() {
try!(write!($w, "{}", part));
}
while let Some(part) = hel.next() {
for part in hel {
try!(write!($w, "\n"));
write_spaces!($spc, $w);
try!(write!($w, "{}", part));
Expand Down
3 changes: 3 additions & 0 deletions src/usageparser.rs
Expand Up @@ -25,6 +25,7 @@ impl<'u> UsageParser<'u> {
}
}

#[cfg_attr(feature = "lints", allow(while_let_on_iterator))]
fn name(&mut self, c: char) -> Option<UsageToken<'u>> {
if self.e != 0 {
self.e += 1;
Expand Down Expand Up @@ -55,6 +56,7 @@ impl<'u> UsageParser<'u> {
}))
}

#[cfg_attr(feature = "lints", allow(while_let_on_iterator))]
fn help(&mut self) -> Option<UsageToken<'u>> {
self.s = self.e + 2;
self.e = self.usage.len() - 1;
Expand All @@ -66,6 +68,7 @@ impl<'u> UsageParser<'u> {
Some(UsageToken::Help(&self.usage[self.s..self.e]))
}

#[cfg_attr(feature = "lints", allow(while_let_on_iterator))]
fn long_arg(&mut self) -> Option<UsageToken<'u>> {
if self.e != 1 {
self.e += 1;
Expand Down

0 comments on commit 111745c

Please sign in to comment.