Message ID | 20230630-clippy-v2-4-f44447925ad6@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series | [libgpiod,v2,1/4] bindings: rust: clippy: drop unnecessary casts | expand |
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) } }
This was fixed on clippy master [1], but it is still broken on 0.1.70. So lets silence it until the clippy fix is widely available. clippy version: clippy 0.1.70 (90c5418 2023-05-31). [1] https://github.com/rust-lang/rust-clippy/commit/9fa40894103e32364fdbade539d4ecb3d40f3d7f Reported-by: Kent Gibson <warthog618@gmail.com> Link: https://lore.kernel.org/r/20230612154055.56556-1-warthog618@gmail.com Signed-off-by: Erik Schilling <erik.schilling@linaro.org> --- bindings/rust/libgpiod/src/event_buffer.rs | 3 +++ 1 file changed, 3 insertions(+)