lint unnecessary .into_iter()
#1094
Labels
A-lint
Area: New lints
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
T-middle
Type: Probably requires verifiying types
for
loops implicitly call.into_iter()
on that which is being iterated over, but if someone didn't know this, they might have written.into_iter()
themselves (this is not merely a hypothetical scenario), which is surely bad style.Example of code that should get a warning (but does not as of Clippy v. 0.0.79):
(could be just
for i in my_vec {
)I'm guessing the implementation would probably be pretty similar to that of the existing
explicit_iter_loop
lint?The text was updated successfully, but these errors were encountered: