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
However, try_filter expects the closure passed to return simply a boolean. The try_ in try_filter allows it to skip Errors that are already in the stream. This seems like a gap of useful functionality.
As a work around I've done something like this
try_stream.try_filter_map(|v|
if v.fallible_async_operation().await? {Ok(Some(v))}else{Ok(None)})
I would have expected both try_filter and try_filter_map to handle fallible filters.
The text was updated successfully, but these errors were encountered:
I expected to be able to be able to filter a try stream with a fallible filter function, like this:
However,
try_filter
expects the closure passed to return simply a boolean. Thetry_
intry_filter
allows it to skip Errors that are already in the stream. This seems like a gap of useful functionality.As a work around I've done something like this
I would have expected both
try_filter
andtry_filter_map
to handle fallible filters.The text was updated successfully, but these errors were encountered: