Closed
Description
Unlike futures-await
, we cannot use ?
operator in async_stream
. It would be useful if we had more sugar for this.
#[async_try_stream(ok = String, error = io::Error)]
fn fetch_all(client: hyper::Client, urls: Vec<&'static str>) {
for url in urls {
yield fetch(client, url).await?;
}
}
Related: rust-lang/futures-rs#1548 (comment)