There was an error while loading. Please reload this page.
1 parent 304f31d commit 4882011Copy full SHA for 4882011
1 file changed
src/state.rs
@@ -1764,12 +1764,11 @@ impl Lua {
1764
pub fn current_thread(&self) -> Thread {
1765
let lua = self.lock();
1766
let state = lua.state();
1767
- let extra = lua.extra.get();
1768
unsafe {
1769
// If this thread is implicit (created by `call_async`), return the root user-owned thread
1770
// instead.
1771
#[cfg(feature = "async")]
1772
- if let Some(&owner) = (*extra).thread_ownership_map.get(&state) {
+ if let Some(&owner) = (*lua.extra.get()).thread_ownership_map.get(&state) {
1773
assert_stack(owner, 1);
1774
ffi::lua_pushthread(owner);
1775
ffi::lua_xmove(owner, lua.ref_thread(), 1);
0 commit comments