From 16cbb442e5c5be1b6925f6b468177755cb9be7f6 Mon Sep 17 00:00:00 2001 From: Alex Orlenko Date: Fri, 6 Jan 2023 20:50:29 +0000 Subject: [PATCH] Fix clippy warnings --- src/lua.rs | 4 ++-- 1 file 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) }); }