diff --git a/crates/guest-rust/src/rt/async_support.rs b/crates/guest-rust/src/rt/async_support.rs
index d2164bdf2..e29c5a234 100644
--- a/crates/guest-rust/src/rt/async_support.rs
+++ b/crates/guest-rust/src/rt/async_support.rs
@@ -235,15 +235,11 @@ impl FutureState<'_> {
let poll = me.tasks.poll_next(&mut context);
match poll {
- // A future completed, yay! Keep going to see if more have
- // completed.
- Poll::Ready(Some(())) => (),
-
// The task list is empty, but there might be remaining work
// in terms of waitables through the cabi interface. In this
// situation wait for all waitables to be resolved before
// signaling that our own task is done.
- Poll::Ready(None) => {
+ Poll::Ready(()) => {
assert!(me.tasks.is_empty());
if me.remaining_work() {
let waitable = me.waitable_set.as_ref().unwrap().as_raw();
diff --git a/crates/guest-rust/src/rt/async_support/spawn.rs b/crates/guest-rust/src/rt/async_support/spawn.rs
index 2a5c5659e..083f686e4 100644
--- a/crates/guest-rust/src/rt/async_support/spawn.rs
+++ b/crates/guest-rust/src/rt/async_support/spawn.rs
@@ -26,13 +26,46 @@ impl<'a> Tasks<'a> {
}
}
- pub fn poll_next(&mut self, cx: &mut Context<'_>) -> Poll