Skip to content

Commit

Permalink
fix(rt-wasmtime): rework future awaiting
Browse files Browse the repository at this point in the history
rust-lang/rust#123748

Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Oct 3, 2024
1 parent 3f66cfa commit 7066e99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/runtime-wasmtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ where
>,
>,
{
let futs: FuturesUnordered<_> = zip(0.., deferred)
let mut futs: FuturesUnordered<_> = zip(0.., deferred)
.filter_map(|(i, f)| f.map(|f| (w.index(&[i]), f)))
.map(|(w, f)| async move {
let w = w?;
f(w).await
})
.collect();
futs.try_collect().await?;
while let Some(()) = futs.try_next().await? {}
Ok(())
}

Expand Down

0 comments on commit 7066e99

Please sign in to comment.