4 ms·
Edit: this is totally wrong No, because that doesn't evaluate the iterator. let it = something .iter_mut() .filter(|item| ...) .en
by duped 4y ago
Edit: this is totally wrong
No, because that doesn't evaluate the iterator.
let it = something
.iter_mut()
.filter(|item| ...)
.enumerate();
for (i, x) in it {
...
}
- proto_lambda 4y agoBoth for_each() and collect() into a Vec exhaust the iterator.