Open
Description
I'd like to run FuturesOrdered::from_iter(...)
and retrieve the result of the last element, which is Option<...>
. The same function exists in std.
It can be implemented with
iter.fold(None, |_acc, x| async move { Some(x) })
But try_last
would require extra checks: if there is an intermediate error, return it. If not, return the last successful Ok(...)
.