We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
yield_with
1 parent feec72b commit 1bd1359Copy full SHA for 1bd1359
src/state/raw.rs
@@ -1325,7 +1325,7 @@ impl RawLua {
1325
let mut ctx = Context::from_waker(rawlua.waker());
1326
match fut.as_mut().map(|fut| fut.as_mut().poll(&mut ctx)) {
1327
Some(Poll::Pending) => {
1328
- let fut_nvals = ffi::lua_gettop(state);
+ let fut_nvals = ffi::lua_gettop(state) - 1; // Exclude the future itself
1329
if fut_nvals >= 3 && ffi::lua_tolightuserdata(state, -3) == Lua::poll_yield().0 {
1330
// We have some values to yield
1331
ffi::lua_pushnil(state);
0 commit comments