From 0f6492be104e124d83779f3f0fc4edd33db18946 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Mon, 22 Dec 2025 21:03:37 +0000 Subject: [PATCH] Fix clippy warning & error They were introduced as part of Rust v1.92.0. --- Cargo.toml | 2 +- src/archive/find.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9a4b7859..5efb3dc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/src/archive/find.rs b/src/archive/find.rs index c9257ffe..bbf35b70 100644 --- a/src/archive/find.rs +++ b/src/archive/find.rs @@ -148,11 +148,11 @@ fn get_file_info(file_path: &Path) -> Option { 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)