From c2cbd4a40d723680e0c52277008dd35cc97d718e Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Tue, 20 Jan 2026 18:53:05 -0700 Subject: [PATCH] clippy: set `needless_range_loop = "allow"` These sorts of imperative-style loops are often one of the easiest-to-read solutions to simple problems. --- Cargo.toml | 3 ++- inout/src/inout.rs | 2 -- inout/src/inout_buf.rs | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5e636007..4c6f7a64 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,13 +40,14 @@ cast_sign_loss = "warn" checked_conversions = "warn" doc_markdown = "warn" from_iter_instead_of_collect = "warn" +implicit_saturating_sub = "warn" manual_assert = "warn" map_unwrap_or = "warn" missing_errors_doc = "warn" missing_panics_doc = "warn" mod_module_files = "warn" must_use_candidate = "warn" -implicit_saturating_sub = "warn" +needless_range_loop = "allow" ptr_as_ptr = "warn" redundant_closure_for_method_calls = "warn" ref_as_ptr = "warn" diff --git a/inout/src/inout.rs b/inout/src/inout.rs index 279b5fe1..1a82000d 100644 --- a/inout/src/inout.rs +++ b/inout/src/inout.rs @@ -186,7 +186,6 @@ impl InOut<'_, '_, Array> { /// # Panics /// If `data` length is not equal to the buffer length. #[inline(always)] - #[allow(clippy::needless_range_loop)] pub fn xor_in2out(&mut self, data: &Array) { unsafe { let input = ptr::read(self.in_ptr); @@ -210,7 +209,6 @@ where /// # Panics /// If `data` length is not equal to the buffer length. #[inline(always)] - #[allow(clippy::needless_range_loop)] pub fn xor_in2out(&mut self, data: &Array, M>) { unsafe { let input = ptr::read(self.in_ptr); diff --git a/inout/src/inout_buf.rs b/inout/src/inout_buf.rs index 99026490..5ab50df3 100644 --- a/inout/src/inout_buf.rs +++ b/inout/src/inout_buf.rs @@ -267,7 +267,6 @@ impl InOutBuf<'_, '_, u8> { /// # Panics /// If `data` length is not equal to the buffer length. #[inline(always)] - #[allow(clippy::needless_range_loop)] pub fn xor_in2out(&mut self, data: &[u8]) { assert_eq!(self.len(), data.len()); unsafe {