-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Lint .into_iter() if that only forwards to .iter() #1565
Copy link
Copy link
Closed
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.L-unnecessaryLint: Warn about unnecessary codeLint: Warn about unnecessary codeT-middleType: Probably requires verifiying typesType: Probably requires verifiying types
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesE-mediumCall for participation: Medium difficulty level problem and requires some initial experience.Call for participation: Medium difficulty level problem and requires some initial experience.L-unnecessaryLint: Warn about unnecessary codeLint: Warn about unnecessary codeT-middleType: Probably requires verifiying typesType: Probably requires verifiying types
Type
Fields
Give feedbackNo fields configured for issues without a type.
cc @bluss
Types like
[T; N]don't implementIntoIterthemselves, but instead provide it through theirDeref<Target=[T]>impl, which is simply a wrapper around calling.iter()..into_iter()suggests that some ownership transfer is going on, if that is not the case.iter()should be used.