summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Orlenko <zxteam@protonmail.com>2023-01-06 20:50:29 +0000
committerAlex Orlenko <zxteam@protonmail.com>2023-01-06 20:50:29 +0000
commit16cbb442e5c5be1b6925f6b468177755cb9be7f6 (patch)
tree52d9cca4f659fa5571bd6ce7575a3b878bd1829f
parent88da28a68d11a2c629265570f2b659c3fb6e971d (diff)
downloadmlua-16cbb442e5c5be1b6925f6b468177755cb9be7f6.zip
Fix clippy warnings
-rw-r--r--src/lua.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua.rs b/src/lua.rs
index fae6681..dce002f 100644
--- a/src/lua.rs
+++ b/src/lua.rs
@@ -437,7 +437,7 @@ impl Lua {
let use_rust_allocator = !(cfg!(feature = "luajit") && cfg!(not(feature = "vendored")));
let (state, mem_info) = if use_rust_allocator {
- let mut mem_info = Box::into_raw(Box::new(MemoryInfo::default()));
+ let mut mem_info: *mut MemoryInfo = Box::into_raw(Box::default());
let mut state = ffi::lua_newstate(allocator, mem_info as *mut c_void);
// If state is null (it's possible for LuaJIT on non-x86 arch) then switch to Lua internal allocator
if state.is_null() {
@@ -1076,7 +1076,7 @@ impl Lua {
"no warning callback set in warn_proc"
);
let msg = CStr::from_ptr(msg);
- cb(&lua, msg, tocont != 0)
+ cb(lua, msg, tocont != 0)
});
}