RS.CLIPPY.ITER_NEXT_SLICE
Using `.iter().next()` on a sliced array, which can be shortened to just `.get()`
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: iter_next_slice. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for usage of iter().next() on a Slice or an Array
Why is this bad?
These can be shortened into .get()
Example
a[2..].iter().next();
b.iter().next();
should be written as:
a.get(2);
b.get(0);