incorrect suggestion for while_let_on_iterator #1924
Labels
A-lint
Area: New lints
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
S-needs-discussion
Status: Needs further discussion before merging or work can be started
T-middle
Type: Probably requires verifiying types
For the snippet below, clippy suggests changing
while let Some(i) = self.s.next()
intofor i in self.s { .. }
, but that results in a "cannot move out of borrowed content" error. In this case,for i in &mut self.s { .. }
would work.The text was updated successfully, but these errors were encountered: