From 9f8fec9e6e0e155836459d45f2f61889be42ae9c Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 17 Jul 2022 21:39:09 +0900 Subject: [PATCH] Ignore clippy::needless_range_loop lint in test ``` warning: the loop variable `i` is used to index `v1` --> tests/unblock.rs:52:18 | 52 | for i in 0..v1.len() { | ^^^^^^^^^^^ | = note: `#[warn(clippy::needless_range_loop)]` on by default = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop help: consider using an iterator | 52 | for (i, ) in v1.iter_mut().enumerate() { | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ warning: the loop variable `i` is used to index `v1` --> tests/unblock.rs:71:18 | 71 | for i in 0..v1.len() { | ^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop help: consider using an iterator | 71 | for (i, ) in v1.iter_mut().enumerate() { | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~ warning: the loop variable `i` is used to index `v` --> tests/unblock.rs:89:18 | 89 | for i in 0..len { | ^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop help: consider using an iterator | 89 | for (i, ) in v.iter_mut().enumerate().take(len) { | ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` --- tests/unblock.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/unblock.rs b/tests/unblock.rs index b1d7c22..96a7888 100644 --- a/tests/unblock.rs +++ b/tests/unblock.rs @@ -1,3 +1,5 @@ +#![allow(clippy::needless_range_loop)] + use std::io::{Cursor, SeekFrom}; use std::sync::mpsc; use std::thread;