From 6e52bb7e651e7cbc55d915a4994b0f232c2966c2 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Sun, 13 Jun 2021 23:08:56 +0100 Subject: [PATCH] Fix clippy warnings && tests --- src/thread.rs | 2 +- src/types.rs | 4 ++-- tests/module/tests/load.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/thread.rs b/src/thread.rs index 20692bd..68e1a68 100644 --- a/src/thread.rs +++ b/src/thread.rs @@ -258,7 +258,7 @@ impl<'lua> Thread<'lua> { A: ToLuaMulti<'lua>, R: FromLuaMulti<'lua>, { - let args = args.to_lua_multi(&self.0.lua); + let args = args.to_lua_multi(self.0.lua); AsyncThread { thread: self, args0: RefCell::new(Some(args)), diff --git a/src/types.rs b/src/types.rs index abff804..b66ea8f 100644 --- a/src/types.rs +++ b/src/types.rs @@ -117,8 +117,8 @@ impl<'lua> PartialEq for LuaRef<'lua> { unsafe { let _sg = StackGuard::new(lua.state); assert_stack(lua.state, 2); - lua.push_ref(&self); - lua.push_ref(&other); + lua.push_ref(self); + lua.push_ref(other); ffi::lua_rawequal(lua.state, -1, -2) == 1 } } diff --git a/tests/module/tests/load.rs b/tests/module/tests/load.rs index 83a9cf8..15dc5ae 100644 --- a/tests/module/tests/load.rs +++ b/tests/module/tests/load.rs @@ -35,7 +35,7 @@ fn test_module_error() -> Result<()> { r#" local ok, err = pcall(require, "rust_module.error") assert(not ok) - assert(string:find(tostring(err), "custom module error")) + assert(string.find(tostring(err), "custom module error")) "#, ) .exec()