We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
try_collect
Option<Vec<T>>
Given a stream of Result<Option<T>>, I'd like to .try_collect into an Option<Vec<T>>, but it seems like this is not supported.
Result<Option<T>>
.try_collect
Is there any obvious reason for this?
Currently my workaround is:
let workers = ...; // some stream of Result<Option<T>> let items = workers .try_collect::<Vec<_>>() .await? .into_iter() .collect::<Option<Vec<_>>>();
Or a manual while loop pushing to a vec.
The text was updated successfully, but these errors were encountered:
Duplicate of #1833.
Sorry, something went wrong.
No branches or pull requests
Given a stream of
Result<Option<T>>
, I'd like to.try_collect
into anOption<Vec<T>>
, but it seems like this is not supported.Is there any obvious reason for this?
Currently my workaround is:
Or a manual while loop pushing to a vec.
The text was updated successfully, but these errors were encountered: