2021-02-11 08:04:38 -06:00
|
|
|
error: unnecessary `if let` since only the `Some` variant of the iterator element is used
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:7:5
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
LL | for n in x {
|
|
|
|
| ^ - help: try: `x.into_iter().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Some(y) = n {
|
|
|
|
LL | | println!("{}", y);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-flatten` implied by `-D warnings`
|
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:8:9
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
LL | / if let Some(y) = n {
|
|
|
|
LL | | println!("{}", y);
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:15:5
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
LL | for n in y.clone() {
|
|
|
|
| ^ --------- help: try: `y.clone().into_iter().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | };
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:16:9
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
LL | / if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | };
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:22:5
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
LL | for n in &y {
|
|
|
|
| ^ -- help: try: `y.iter().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:23:9
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
LL | / if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: unnecessary `if let` since only the `Ok` variant of the iterator element is used
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:32:5
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
LL | for n in z {
|
|
|
|
| ^ - help: try: `z.into_iter().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Ok(n) = n {
|
|
|
|
LL | | println!("{}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:33:9
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
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
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:41:5
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
LL | for n in z {
|
|
|
|
| ^ - help: try: `z.flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Some(m) = n {
|
|
|
|
LL | | println!("{}", m);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: ...and remove the `if let` statement in the for loop
|
2021-03-25 13:29:11 -05:00
|
|
|
--> $DIR/manual_flatten.rs:42:9
|
2021-02-11 08:04:38 -06:00
|
|
|
|
|
|
|
|
LL | / if let Some(m) = n {
|
|
|
|
LL | | println!("{}", m);
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
|
2021-03-25 13:29:11 -05:00
|
|
|
error: unnecessary `if let` since only the `Some` variant of the iterator element is used
|
|
|
|
--> $DIR/manual_flatten.rs:74:5
|
|
|
|
|
|
|
|
|
LL | for n in &vec_of_ref {
|
|
|
|
| ^ ----------- help: try: `vec_of_ref.iter().copied().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Some(n) = n {
|
|
|
|
LL | | println!("{:?}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: ...and remove the `if let` statement in the for loop
|
|
|
|
--> $DIR/manual_flatten.rs:75:9
|
|
|
|
|
|
|
|
|
LL | / if let Some(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:81:5
|
|
|
|
|
|
|
|
|
LL | for n in vec_of_ref {
|
|
|
|
| ^ ---------- help: try: `vec_of_ref.into_iter().copied().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Some(n) = n {
|
|
|
|
LL | | println!("{:?}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: ...and remove the `if let` statement in the for loop
|
|
|
|
--> $DIR/manual_flatten.rs:82:9
|
|
|
|
|
|
|
|
|
LL | / if let Some(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:88:5
|
|
|
|
|
|
|
|
|
LL | for n in slice_of_ref {
|
|
|
|
| ^ ------------ help: try: `slice_of_ref.into_iter().copied().flatten()`
|
|
|
|
| _____|
|
|
|
|
| |
|
|
|
|
LL | | if let Some(n) = n {
|
|
|
|
LL | | println!("{:?}", n);
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_____^
|
|
|
|
|
|
|
|
|
help: ...and remove the `if let` statement in the for loop
|
|
|
|
--> $DIR/manual_flatten.rs:89:9
|
|
|
|
|
|
|
|
|
LL | / if let Some(n) = n {
|
|
|
|
LL | | println!("{:?}", n);
|
|
|
|
LL | | }
|
|
|
|
| |_________^
|
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
2021-02-11 08:04:38 -06:00
|
|
|
|