Fix clippy warnings

This commit is contained in:
Alex Orlenko 2023-01-06 20:50:29 +00:00
parent 88da28a68d
commit 16cbb442e5
No known key found for this signature in database
GPG Key ID: 4C150C250863B96D
1 changed files with 2 additions and 2 deletions

View File

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