Clean Rust 1.90 clippy warnings

This commit is contained in:
Jackson Coxson
2025-11-10 13:32:49 -07:00
parent fbdc290d88
commit e31f39eac0
2 changed files with 2 additions and 2 deletions

View File

@@ -744,7 +744,7 @@ pub unsafe extern "C" fn afc_rename_path(
#[unsafe(no_mangle)] #[unsafe(no_mangle)]
pub unsafe extern "C" fn afc_file_read_data_free(data: *mut u8, length: libc::size_t) { pub unsafe extern "C" fn afc_file_read_data_free(data: *mut u8, length: libc::size_t) {
if !data.is_null() { if !data.is_null() {
let boxed = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(data, length)) }; let boxed = unsafe { Box::from_raw(std::ptr::slice_from_raw_parts_mut(data, length)) };
drop(boxed); drop(boxed);
} }
} }

View File

@@ -199,7 +199,7 @@ pub unsafe extern "C" fn misagent_free_profiles(
for (ptr, len) in profiles.iter_mut().zip(lens.iter()) { for (ptr, len) in profiles.iter_mut().zip(lens.iter()) {
if !ptr.is_null() { if !ptr.is_null() {
let _ = unsafe { Box::from_raw(std::slice::from_raw_parts_mut(*ptr, *len)) }; let _ = unsafe { Box::from_raw(std::ptr::slice_from_raw_parts_mut(*ptr, *len)) };
} }
} }