aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Schilling <erik.schilling@linaro.org>2023-06-30 13:18:47 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-06-30 14:10:30 +0200
commit4b8357b36886dcada5fbe6263ab44fc006a06e05 (patch)
tree20877c4478f8d1644ac6c371e506d5cbabfaa7fb
parent39189f0bf59cc56a02260dd32ad4b331ce73acce (diff)
downloadlibgpiod-4b8357b36886dcada5fbe6263ab44fc006a06e05.tar.gz
bindings: rust: clippy: silence false-positive on iterator
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> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
-rw-r--r--bindings/rust/libgpiod/src/event_buffer.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/bindings/rust/libgpiod/src/event_buffer.rs b/bindings/rust/libgpiod/src/event_buffer.rs
index b79e9ea3..2e4bfd38 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)
}
}