Auto merge of #23682 - tamird:DRY-is-empty, r=alexcrichton
r? @alexcrichton
This commit is contained in:
commit
288809c8f3
104 changed files with 262 additions and 259 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue