Fix clippy warning & error

They were introduced as part of Rust v1.92.0.
This commit is contained in:
Oliver Hamlet
2025-12-22 21:03:37 +00:00
parent fa97ac8b5d
commit 0f6492be10
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -85,6 +85,7 @@ fn_to_numeric_cast_any = "forbid"
get_unwrap = "forbid"
host_endian_bytes = "forbid"
if_then_some_else_none = "forbid"
implicit_clone = "forbid"
indexing_slicing = "deny"
infinite_loop = "forbid"
integer_division = "forbid"
@@ -120,7 +121,6 @@ rest_pat_in_fully_bound_structs = "forbid"
str_to_string = "forbid"
string_lit_chars_any = "forbid"
string_slice = "forbid"
string_to_string = "forbid"
suspicious_xor_used_as_pow = "forbid"
tests_outside_test_module = "forbid"
todo = "forbid"
+1 -1
View File
@@ -148,11 +148,11 @@ fn get_file_info(file_path: &Path) -> Option<BY_HANDLE_FILE_INFORMATION> {
let mut info = BY_HANDLE_FILE_INFORMATION::default();
// SAFETY: This is safe because the file handles and the info struct pointers are all valid until this function exits.
#[expect(
unsafe_code,
reason = "There is currently no way to get this data safely"
)]
// SAFETY: This is safe because the file handles and the info struct pointers are all valid until this function exits.
let result = unsafe { GetFileInformationByHandle(file.as_raw_handle(), &raw mut info) };
(result != 0).then_some(info)