diff --git a/src/lua.rs b/src/lua.rs index 773281a..244a44e 100644 --- a/src/lua.rs +++ b/src/lua.rs @@ -2558,7 +2558,7 @@ impl Lua { } let func = &*(*upvalue).data; - let mut results = func(&lua, args)?; + let mut results = func(lua, args)?; let nresults = results.len() as c_int; check_stack(state, nresults)?; diff --git a/src/serde/mod.rs b/src/serde/mod.rs index bc2bb69..74f0681 100644 --- a/src/serde/mod.rs +++ b/src/serde/mod.rs @@ -158,6 +158,7 @@ pub trait LuaSerdeExt<'lua> { /// Ok(()) /// } /// ``` + #[allow(clippy::wrong_self_convention)] fn from_value>(&'lua self, value: Value<'lua>) -> Result; /// Deserializes a [`Value`] into any serde deserializable object with options. @@ -189,6 +190,7 @@ pub trait LuaSerdeExt<'lua> { /// Ok(()) /// } /// ``` + #[allow(clippy::wrong_self_convention)] fn from_value_with>( &'lua self, value: Value<'lua>, diff --git a/src/thread.rs b/src/thread.rs index 9aafd0a..dcdb565 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -435,7 +435,7 @@ where fn is_poll_pending(val: &MultiValue) -> bool { match val.iter().enumerate().last() { Some((0, Value::LightUserData(ud))) => { - ud.0 as *const u8 == &ASYNC_POLL_PENDING as *const u8 + std::ptr::eq(ud.0 as *const u8, &ASYNC_POLL_PENDING as *const u8) } _ => false, }