Fix clippy warnings && tests
This commit is contained in:
parent
08ffeb0ca9
commit
6e52bb7e65
|
@ -258,7 +258,7 @@ impl<'lua> Thread<'lua> {
|
||||||
A: ToLuaMulti<'lua>,
|
A: ToLuaMulti<'lua>,
|
||||||
R: FromLuaMulti<'lua>,
|
R: FromLuaMulti<'lua>,
|
||||||
{
|
{
|
||||||
let args = args.to_lua_multi(&self.0.lua);
|
let args = args.to_lua_multi(self.0.lua);
|
||||||
AsyncThread {
|
AsyncThread {
|
||||||
thread: self,
|
thread: self,
|
||||||
args0: RefCell::new(Some(args)),
|
args0: RefCell::new(Some(args)),
|
||||||
|
|
|
@ -117,8 +117,8 @@ impl<'lua> PartialEq for LuaRef<'lua> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let _sg = StackGuard::new(lua.state);
|
let _sg = StackGuard::new(lua.state);
|
||||||
assert_stack(lua.state, 2);
|
assert_stack(lua.state, 2);
|
||||||
lua.push_ref(&self);
|
lua.push_ref(self);
|
||||||
lua.push_ref(&other);
|
lua.push_ref(other);
|
||||||
ffi::lua_rawequal(lua.state, -1, -2) == 1
|
ffi::lua_rawequal(lua.state, -1, -2) == 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ fn test_module_error() -> Result<()> {
|
||||||
r#"
|
r#"
|
||||||
local ok, err = pcall(require, "rust_module.error")
|
local ok, err = pcall(require, "rust_module.error")
|
||||||
assert(not ok)
|
assert(not ok)
|
||||||
assert(string:find(tostring(err), "custom module error"))
|
assert(string.find(tostring(err), "custom module error"))
|
||||||
"#,
|
"#,
|
||||||
)
|
)
|
||||||
.exec()
|
.exec()
|
||||||
|
|
Loading…
Reference in New Issue