Closed toyboot4e closed 3 years ago
These iterators look perfect to me! Can you also add an entry to CHANGELOG.md
to mention that these iterators were introduced?
Yes, I commited now :)
Edit: Feel free to modify my PR. I'm not sure if I did it right, actually.
Thank you!
Currently,
Arena::iter
orArena::iter_mut
have to be called to use iterators. This PR adds trait impls that allow idiomatic loop syntax:for .. in &arena
.Example:
Output:
The iterators return
(index, item)
pairs, but it's not common, so item-only iterator can be preferable.What would you think? Thank you.