2021-02-02 12:04:20 -06:00
|
|
|
error: unnecessary `if let` since only the `Some` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:6:5
|
2021-01-28 18:38:34 -06:00
|
|
|
|
|
2021-02-03 12:45:58 -06:00
|
|
|
LL | for n in x {
|
|
|
|
| ^ - help: try: `x.into_iter().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Some(y) = n {
|
|
|
|
LL | | println!("{}", y);
|
2021-01-28 18:38:34 -06:00
|
|
|
LL | | }
|
|
|
|
LL | | }
|
2021-02-03 12:45:58 -06:00
|
|
|
| |_____^
|
2021-01-28 18:38:34 -06:00
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-flatten` implied by `-D warnings`
|
2021-02-04 03:51:40 -06:00
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-02-03 12:45:58 -06:00
|
|
|
--> $DIR/manual_flatten.rs:7:9
|
|
|
|
|
|
|
|
|
LL | / if let Some(y) = n {
|
|
|
|
LL | | println!("{}", y);
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
2021-01-28 18:38:34 -06:00
|
|
|
|
2021-02-02 12:04:20 -06:00
|
|
|
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:14:5
|
2021-01-28 18:38:34 -06:00
|
|
|
|
|
2021-02-03 12:45:58 -06:00
|
|
|
LL | for n in y.clone() {
|
|
|
|
| ^ --------- help: try: `y.clone().into_iter().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
2021-01-28 18:38:34 -06:00
|
|
|
LL | | if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
2021-02-02 12:04:20 -06:00
|
|
|
LL | | };
|
2021-01-28 18:38:34 -06:00
|
|
|
LL | | }
|
2021-02-03 12:45:58 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
2021-02-04 03:51:40 -06:00
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-02-03 12:45:58 -06:00
|
|
|
--> $DIR/manual_flatten.rs:15:9
|
|
|
|
|
|
|
|
|
LL | / if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | };
|
|
|
|
| |_________^
|
2021-02-02 12:04:20 -06:00
|
|
|
|
|
|
|
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:21:5
|
2021-01-28 18:38:34 -06:00
|
|
|
|
|
2021-02-03 12:45:58 -06:00
|
|
|
LL | for n in &y {
|
|
|
|
| ^ -- help: try: `y.iter().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
2021-02-02 12:04:20 -06:00
|
|
|
LL | | if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
2021-02-03 12:45:58 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
2021-02-04 03:51:40 -06:00
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-02-03 12:45:58 -06:00
|
|
|
--> $DIR/manual_flatten.rs:22:9
|
|
|
|
|
|
|
|
|
LL | / if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
2021-01-28 18:38:34 -06:00
|
|
|
|
2021-02-03 12:45:58 -06:00
|
|
|
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:31:5
|
2021-01-28 18:38:34 -06:00
|
|
|
|
|
2021-02-03 12:45:58 -06:00
|
|
|
LL | for n in z {
|
|
|
|
| ^ - help: try: `z.into_iter().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Ok(n) = n {
|
2021-01-28 18:38:34 -06:00
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
2021-02-03 12:45:58 -06:00
|
|
|
| |_____^
|
|
|
|
|
|
2021-02-04 03:51:40 -06:00
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-02-03 12:45:58 -06:00
|
|
|
--> $DIR/manual_flatten.rs:32:9
|
|
|
|
|
|
|
|
|
LL | / if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: unnecessary `if let` since only the `Some` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:40:5
|
|
|
|
|
|
|
|
|
LL | for n in z {
|
|
|
|
| ^ - help: try: `z.flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Some(m) = n {
|
|
|
|
LL | | println!("{}", m);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
2021-02-04 03:51:40 -06:00
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-02-03 12:45:58 -06:00
|
|
|
--> $DIR/manual_flatten.rs:41:9
|
|
|
|
|
|
|
|
|
LL | / if let Some(m) = n {
|
|
|
|
LL | | println!("{}", m);
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
2021-01-28 18:38:34 -06:00
|
|
|
|
2021-02-03 12:45:58 -06:00
|
|
|
error: aborting due to 5 previous errors
|
2021-01-28 18:38:34 -06:00
|
|
|
|