RS.CLIPPY.SKIP_WHILE_NEXT
Using `skip_while(p).next()`, which is more succinctly expressed as `.find(!p)`
This checker is a Clippy lint created by The Rust Project Contributors. The documentation shown here is a copy of the original documentation for: skip_while_next. Copyright ©2025 The Rust Team. All rights reserved.
What it does
Checks for usage of _.skip_while(condition).next().
Why is this bad?
Readability, this can be written more concisely as
_.find(!condition).
Example
vec.iter().skip_while(|x| **x == 0).next();
Use instead:
vec.iter().find(|x| **x != 0);