Don't cast *const to *mut (for pointers comparison)
This commit is contained in:
parent
a8fef51e86
commit
d1c80be033
|
@ -257,7 +257,7 @@ pub(crate) unsafe fn init_metatables(state: *mut ffi::lua_State) -> Result<()> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) unsafe fn push_array_metatable(state: *mut ffi::lua_State) {
|
pub(crate) unsafe fn push_array_metatable(state: *mut ffi::lua_State) {
|
||||||
let array_metatable_key = &ARRAY_METATABLE_REGISTRY_KEY as *const u8 as *mut c_void;
|
let array_metatable_key = &ARRAY_METATABLE_REGISTRY_KEY as *const u8 as *const c_void;
|
||||||
ffi::lua_rawgetp(state, ffi::LUA_REGISTRYINDEX, array_metatable_key);
|
ffi::lua_rawgetp(state, ffi::LUA_REGISTRYINDEX, array_metatable_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ use {
|
||||||
std::{
|
std::{
|
||||||
cell::RefCell,
|
cell::RefCell,
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
os::raw::c_void,
|
|
||||||
pin::Pin,
|
pin::Pin,
|
||||||
task::{Context, Poll, Waker},
|
task::{Context, Poll, Waker},
|
||||||
},
|
},
|
||||||
|
@ -436,7 +435,7 @@ where
|
||||||
fn is_poll_pending(val: &MultiValue) -> bool {
|
fn is_poll_pending(val: &MultiValue) -> bool {
|
||||||
match val.iter().enumerate().last() {
|
match val.iter().enumerate().last() {
|
||||||
Some((0, Value::LightUserData(ud))) => {
|
Some((0, Value::LightUserData(ud))) => {
|
||||||
ud.0 == &ASYNC_POLL_PENDING as *const u8 as *mut c_void
|
ud.0 as *const u8 == &ASYNC_POLL_PENDING as *const u8
|
||||||
}
|
}
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue