You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.enumerate() is a very convenient way to get a running count of stream results. When trying to use it on a stream that could error, you lose the ability to use functions like .map_ok because the resulting item type is now a tuple (usize, Result<...>). The API loses a little bit of fluency because you have to drop down to a .map call and handle all the cases manually. It would be nice to have a try_enumerate function that would return a Result<(usize, T), Error>.
I apologise if this is not the right place to ask for such a small API change.
The text was updated successfully, but these errors were encountered:
.enumerate()
is a very convenient way to get a running count of stream results. When trying to use it on a stream that could error, you lose the ability to use functions like.map_ok
because the resulting item type is now a tuple(usize, Result<...>)
. The API loses a little bit of fluency because you have to drop down to a.map
call and handle all the cases manually. It would be nice to have atry_enumerate
function that would return aResult<(usize, T), Error>
.I apologise if this is not the right place to ask for such a small API change.
The text was updated successfully, but these errors were encountered: