-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Description
The source has just over 200 calls to iter, iter_mut or into_iter to things that take and T: IntoIterator. This is, by my count, about 10% of them!
Some examples are left.extend(Some(x).into_iter()) instead of left.extend(Some(x)) and for &(s,t) in v.iter() instead of for &(s,t) in v.
I thought this would make a quick, trivial change to warm myself up to the build system and such, so I've already got a branch removing it. I thought I'd ask if it's actually desirable to do so, though, since it's a lot of seemingly-meaningless code churn.
If this is wanted, the docs should probably also be updated to emphasize that many calls to .*iter() aren't needed. Much of the documentation for iter() and co. uses them in places where they can be elided.
Metadata
Metadata
Assignees
Labels
No labels