Skip to content

Commit c2cbd4a

Browse files
committed
clippy: set needless_range_loop = "allow"
These sorts of imperative-style loops are often one of the easiest-to-read solutions to simple problems.
1 parent 281ce57 commit c2cbd4a

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ cast_sign_loss = "warn"
4040
checked_conversions = "warn"
4141
doc_markdown = "warn"
4242
from_iter_instead_of_collect = "warn"
43+
implicit_saturating_sub = "warn"
4344
manual_assert = "warn"
4445
map_unwrap_or = "warn"
4546
missing_errors_doc = "warn"
4647
missing_panics_doc = "warn"
4748
mod_module_files = "warn"
4849
must_use_candidate = "warn"
49-
implicit_saturating_sub = "warn"
50+
needless_range_loop = "allow"
5051
ptr_as_ptr = "warn"
5152
redundant_closure_for_method_calls = "warn"
5253
ref_as_ptr = "warn"

inout/src/inout.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ impl<N: ArraySize> InOut<'_, '_, Array<u8, N>> {
186186
/// # Panics
187187
/// If `data` length is not equal to the buffer length.
188188
#[inline(always)]
189-
#[allow(clippy::needless_range_loop)]
190189
pub fn xor_in2out(&mut self, data: &Array<u8, N>) {
191190
unsafe {
192191
let input = ptr::read(self.in_ptr);
@@ -210,7 +209,6 @@ where
210209
/// # Panics
211210
/// If `data` length is not equal to the buffer length.
212211
#[inline(always)]
213-
#[allow(clippy::needless_range_loop)]
214212
pub fn xor_in2out(&mut self, data: &Array<Array<u8, N>, M>) {
215213
unsafe {
216214
let input = ptr::read(self.in_ptr);

inout/src/inout_buf.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ impl InOutBuf<'_, '_, u8> {
267267
/// # Panics
268268
/// If `data` length is not equal to the buffer length.
269269
#[inline(always)]
270-
#[allow(clippy::needless_range_loop)]
271270
pub fn xor_in2out(&mut self, data: &[u8]) {
272271
assert_eq!(self.len(), data.len());
273272
unsafe {

0 commit comments

Comments
 (0)