3 ms·
Oh neat, I didn't know that existed. That's a combination of what I was trying to say above. If your for loop body is infallible then for_each is good enough.
by dpbriggs 4y ago
Oh neat, I didn't know that existed. That's a combination of what I was trying to say above.
If your for loop body is infallible then for_each is good enough.
If you're trying to 'collect' some iterator into some data structure T, you can collect into Result<T, _> and question mark on that.