Fix clippy warnings
This commit is contained in:
parent
d3975bdf30
commit
86f506a170
|
@ -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)?;
|
||||
|
|
|
@ -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>,
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue