[PATCH libgpiod 4/4] bindings: rust: clippy: silence false-positive on iterator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This was fixed, but it is not in stable yet.

Tested build on x86_64, armv7hf, aarch64.

Reported-by: Kent Gibson <warthog618@xxxxxxxxx>
Link: https://lore.kernel.org/r/20230612154055.56556-1-warthog618@xxxxxxxxx
Signed-off-by: Erik Schilling <erik.schilling@xxxxxxxxxx>
---
 bindings/rust/libgpiod/src/event_buffer.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/bindings/rust/libgpiod/src/event_buffer.rs b/bindings/rust/libgpiod/src/event_buffer.rs
index b79e9ea..2e4bfd3 100644
--- a/bindings/rust/libgpiod/src/event_buffer.rs
+++ b/bindings/rust/libgpiod/src/event_buffer.rs
@@ -54,6 +54,9 @@ impl<'a> Iterator for Events<'a> {
     }
 
     fn next(&mut self) -> Option<Self::Item> {
+        // clippy false-positive, fixed in next clippy release:
+        // https://github.com/rust-lang/rust-clippy/issues/9820
+        #[allow(clippy::iter_nth_zero)]
         self.nth(0)
     }
 }

-- 
2.40.1




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux