mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-11 07:34:18 +00:00
16 lines
578 B
Text
16 lines
578 B
Text
error: called `flat_map(|x| x)` on an `Iterator`. This can be simplified by calling `flatten().`
|
|
--> $DIR/unnecessary_flat_map.rs:7:5
|
|
|
|
|
LL | iterator.flat_map(|x| x);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::flat-map-identity` implied by `-D warnings`
|
|
|
|
error: called `flat_map(std::convert::identity)` on an `Iterator`. This can be simplified by calling `flatten().`
|
|
--> $DIR/unnecessary_flat_map.rs:10:23
|
|
|
|
|
LL | iterator.flat_map(convert::identity);
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|