2021-02-02 18:04:20 +00:00
|
|
|
error: unnecessary `if let` since only the `Some` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:6:5
|
2021-01-29 00:38:34 +00:00
|
|
|
|
|
|
|
|
LL | / for n in x {
|
|
|
|
LL | | if let Some(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
2021-02-02 18:04:20 +00:00
|
|
|
| |_____^ help: try: `x.into_iter().flatten()`
|
2021-01-29 00:38:34 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-flatten` implied by `-D warnings`
|
|
|
|
|
2021-02-02 18:04:20 +00:00
|
|
|
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:14:5
|
2021-01-29 00:38:34 +00:00
|
|
|
|
|
|
|
|
LL | / for n in y.clone() {
|
|
|
|
LL | | if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
2021-02-02 18:04:20 +00:00
|
|
|
LL | | };
|
2021-01-29 00:38:34 +00:00
|
|
|
LL | | }
|
2021-02-02 18:04:20 +00:00
|
|
|
| |_____^ help: try: `y.clone().into_iter().flatten()`
|
|
|
|
|
|
|
|
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:21:5
|
2021-01-29 00:38:34 +00:00
|
|
|
|
|
2021-02-02 18:04:20 +00:00
|
|
|
LL | / for n in &y {
|
|
|
|
LL | | if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_____^ help: try: `y.iter().flatten()`
|
2021-01-29 00:38:34 +00:00
|
|
|
|
2021-02-02 18:04:20 +00:00
|
|
|
error: unnecessary `if let` since only the `Some` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:30:5
|
2021-01-29 00:38:34 +00:00
|
|
|
|
|
|
|
|
LL | / for n in z {
|
|
|
|
LL | | if let Some(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
2021-02-02 18:04:20 +00:00
|
|
|
| |_____^ help: try: `z.flatten()`
|
2021-01-29 00:38:34 +00:00
|
|
|
|
2021-02-02 18:04:20 +00:00
|
|
|
error: aborting due to 4 previous errors
|
2021-01-29 00:38:34 +00:00
|
|
|
|