Fix clippy warnings

This commit is contained in:
Alex Orlenko 2022-07-17 11:11:30 +01:00
parent 059e41bafb
commit f75af6d75f
No known key found for this signature in database
GPG key ID: 4C150C250863B96D
2 changed files with 3 additions and 3 deletions

View file

@ -2961,14 +2961,14 @@ struct StateGuard<'a>(&'a mut LuaInner, *mut ffi::lua_State);
impl<'a> StateGuard<'a> {
fn new(inner: &'a mut LuaInner, mut state: *mut ffi::lua_State) -> Self {
mem::swap(&mut (*inner).state, &mut state);
mem::swap(&mut inner.state, &mut state);
Self(inner, state)
}
}
impl<'a> Drop for StateGuard<'a> {
fn drop(&mut self) {
mem::swap(&mut (*self.0).state, &mut self.1);
mem::swap(&mut self.0.state, &mut self.1);
}
}

View file

@ -239,7 +239,7 @@ impl<'a, 'lua> IntoIterator for &'a MultiValue<'lua> {
#[inline]
fn into_iter(self) -> Self::IntoIter {
(&self.0).iter().rev()
self.0.iter().rev()
}
}