Negative case of len() -> is_empty()

`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
This commit is contained in:
Tamir Duberstein
2015-03-24 16:54:09 -07:00
parent 29ac04402d
commit 10f15e72e6
61 changed files with 142 additions and 142 deletions

View File

@@ -2254,7 +2254,7 @@ impl<'a> Parser<'a> {
(Vec::new(), Vec::new(), Vec::new())
};
if bindings.len() > 0 {
if !bindings.is_empty() {
let last_span = self.last_span;
self.span_err(last_span, "type bindings are only permitted on trait paths");
}
@@ -3024,7 +3024,7 @@ impl<'a> Parser<'a> {
try!(self.expect(&token::Comma));
if self.token == token::CloseDelim(token::Bracket)
&& (before_slice || after.len() != 0) {
&& (before_slice || !after.is_empty()) {
break
}
}