To demagic for _ in x: does x impl Iterator or, failing that, IntoIterator? If so, what is the above trait impl's associated Item? Many collections implement Iterator with a wrapping struct called mod::Iter / IterMut (by idiom), created by IntoIter for & and &mut, respectively.
-
-
-
This was on a regular vector inside a struct, so it should have them all. Don't believe &mut iterator did the trick either, but going to have to double check to make sure!
- 1 more reply
New conversation -
-
-
`for foo in &mut my_iter` can fix this too
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.