Heh, ran into another speed bump with Rust: `for mut foo in &my_iter` didn't work the way I thought it would. https://github.com/yoshuawuyts/speedbumps/blob/master/2018-07-30-Rust%20core.md …
-
-
Replying to @yoshuawuyts
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.
1 reply 0 retweets 1 like -
Replying to @sadisticsystems
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 reply 0 retweets 1 like
Replying to @yoshuawuyts @sadisticsystems
lol nope, you were entirely right! Heh nice :D
10:21 AM - 30 Jul 2018
0 replies
0 retweets
0 likes
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.