mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 21:53:23 +00:00
11 lines
258 B
Rust
11 lines
258 B
Rust
#![warn(clippy::filter_next)]
|
|
//@no-rustfix
|
|
fn main() {
|
|
issue10029();
|
|
}
|
|
|
|
pub fn issue10029() {
|
|
let iter = (0..10);
|
|
let _ = iter.filter(|_| true).next();
|
|
//~^ ERROR: called `filter(..).next()` on an `Iterator`. This is more succinctly expre
|
|
}
|