Fix clippy warnings

This commit is contained in:
Alex Orlenko
2022-07-17 11:11:30 +01:00
parent 059e41bafb
commit f75af6d75f
2 changed files with 3 additions and 3 deletions
+2 -2
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);
}
}