Y
Hacker News
new
|
ask
|
show
|
jobs
by
Patryk27
643 days ago
fwiw, Option already implements iterator (well, IntoIterator) - calling .into_iter() on an Option will get you an iterator, no need to create anything custom.
1 comments
antonvs
643 days ago
I wonder if that existed when this article was written in 2018.
link
MereInterest
643 days ago
The footnotes mention that this solution was suggested by Reddit comments at the time.
link