mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
2a1dbbaec5
Enhance `needless_collect`: lint in method/function arguments that take an `IntoIterator` Updates `needless_collect` to also lint `collect` calls in method/function arguments that take an `IntoIterator` (for example `Extend::extend`). Every `Iterator` trivially implements `IntoIterator` and collecting it only causes an unnecessary allocation. --- changelog: Enhancement: [`needless_collect`]: Now also detects function arguments, taking a generic `IntoIterator` [#10777](https://github.com/rust-lang/rust-clippy/pull/10777) <!-- changelog_checked --> fixes #10762 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |