diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-09-21 19:16:38 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-09-27 09:35:47 +0300 |
commit | f396b26c484ad4adfa28f9be58e43650c8bd69c2 (patch) | |
tree | f61940eed3f36df68b4e6297548781d708d9cccb /src | |
parent | fc7e8c185ed80799ab2998f10f28a4ca0aeb3e57 (diff) |
Use .cloned() on iterators, instead of .map(|x| x.clone())clippy-bunch
Instead of this:
iter().map(|x| x.clone())
use this:
iter().cloned()
The dedicated method on iterators is shorter and more to the point,
and should thus be easier to understand.
Found by clippy lint map_clone:
https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions