diff options
author | Alex Orlenko <zxteam@protonmail.com> | 2023-01-06 20:50:29 +0000 |
---|---|---|
committer | Alex Orlenko <zxteam@protonmail.com> | 2023-01-06 20:50:29 +0000 |
commit | 16cbb442e5c5be1b6925f6b468177755cb9be7f6 (patch) | |
tree | 52d9cca4f659fa5571bd6ce7575a3b878bd1829f | |
parent | 88da28a68d11a2c629265570f2b659c3fb6e971d (diff) | |
download | mlua-16cbb442e5c5be1b6925f6b468177755cb9be7f6.zip |
Fix clippy warnings
-rw-r--r-- | src/lua.rs | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) }); } |