Fix clippy warnings && tests

This commit is contained in:
Alex Orlenko 2021-06-13 23:08:56 +01:00
parent 08ffeb0ca9
commit 6e52bb7e65
3 changed files with 4 additions and 4 deletions

View file

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

View file

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

View file

@ -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()