diff --git a/src/coroutine.rs b/src/coroutine.rs index a530184a1c3..564262f3bf4 100644 --- a/src/coroutine.rs +++ b/src/coroutine.rs @@ -100,7 +100,7 @@ impl Coroutine { } // if waker has been waken during future polling, this is roughly equivalent to // `await asyncio.sleep(0)`, so just yield `None`. - Ok(IterNextOutput::Yield(py.None())) + Ok(IterNextOutput::Yield(py.None().into())) } }