add unused_mut lint

This commit is contained in:
auronandace
2026-02-08 09:00:14 +00:00
parent a935094d2d
commit 64f18ca89a
18 changed files with 48 additions and 76 deletions
+2 -3
View File
@@ -11,8 +11,7 @@ use crate::{
fs::File,
header::{errno, fcntl},
io::Read,
platform::types::{c_char, c_int, c_void},
sync::Once,
platform::types::{c_char, c_int},
};
// Can't use &str because of the mutability
@@ -58,7 +57,7 @@ pub unsafe extern "C" fn setlocale(category: c_int, locale: *const c_char) -> *m
let new_global = GlobalLocaleData::new();
unsafe { GLOBAL_LOCALE = Box::into_raw(new_global) };
};
let Some(mut global) = (unsafe { GLOBAL_LOCALE.as_mut() }) else {
let Some(global) = (unsafe { GLOBAL_LOCALE.as_mut() }) else {
return ptr::null_mut();
};