Auto merge of #23682 - tamird:DRY-is-empty, r=alexcrichton

r? @alexcrichton
This commit is contained in:
bors 2015-04-16 03:22:21 +00:00
commit 288809c8f3
104 changed files with 262 additions and 259 deletions

View file

@ -3788,7 +3788,7 @@ its type parameters are types:
```ignore
fn map<A: Clone, B: Clone>(f: |A| -> B, xs: &[A]) -> Vec<B> {
if xs.len() == 0 {
if xs.is_empty() {
return vec![];
}
let first: B = f(xs[0].clone());