Fix clippy warnings

This commit is contained in:
Alex Orlenko 2022-04-14 21:55:36 +01:00
parent d3975bdf30
commit 86f506a170
No known key found for this signature in database
GPG key ID: 4C150C250863B96D
3 changed files with 4 additions and 2 deletions

View file

@ -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)?;

View file

@ -158,6 +158,7 @@ pub trait LuaSerdeExt<'lua> {
/// Ok(())
/// }
/// ```
#[allow(clippy::wrong_self_convention)]
fn from_value<T: Deserialize<'lua>>(&'lua self, value: Value<'lua>) -> Result<T>;
/// 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<T: Deserialize<'lua>>(
&'lua self,
value: Value<'lua>,

View file

@ -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,
}