mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 06:26:55 +00:00
![]() 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 |
||
---|---|---|
.. | ||
test_utils | ||
ui | ||
ui-cargo | ||
ui-internal | ||
ui-toml | ||
workspace_test | ||
check-fmt.rs | ||
clippy.toml | ||
compile-test.rs | ||
dogfood.rs | ||
integration.rs | ||
lint_message_convention.rs | ||
missing-test-files.rs | ||
versioncheck.rs | ||
workspace.rs |