Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
Patryk27
· 2y ago · 0 comments
fwiw, Option already implements iterator (well, IntoIterator) - calling .into_iter() on an Option will get you an iterator, no need to create anything custom.
Comments
[–]
antonvs
2y ago
I wonder if that existed when this article was written in 2018.
[–]
MereInterest
2y ago
The footnotes mention that this solution was suggested by Reddit comments at the time.