Sign in
android
/
toolchain
/
rustc
/
f7ad1c480b8dc4097ef67cd82ec1c5b706e10950
/
.
/
src
/
tools
/
clippy
/
src
/
docs
/
flat_map_identity.txt
blob: a5ee79b4982fb753d1d99c77b40491d9b26c0013 [
file
] [
log
] [
blame
]
### What it does
Checks for usage of `flat_map(|x| x)`.
### Why is this bad?
Readability, this can be written more concisely by using `flatten`.
### Example
```
iter.flat_map(|x| x);
```
Can be written as
```
iter.flatten();
```