6 ms·
It’s useful for Option to be iterable so that it works with things like .flat_map(), and it’s useful to be able to count from an arbitrary iterable. .iter().co
by anderskaseorg 3y ago
It’s useful for Option to be iterable so that it works with things like .flat_map(), and it’s useful to be able to count from an arbitrary iterable.
.iter().count() is a contrived way to find the length of a Vec though, since .len() is clearer and faster.