mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-14 17:07:17 +00:00
10 lines
233 B
Rust
10 lines
233 B
Rust
#![warn(clippy::filter_next)]
|
|
#![allow(clippy::useless_vec)]
|
|
|
|
/// Checks implementation of `FILTER_NEXT` lint.
|
|
fn main() {
|
|
let v = vec![3, 2, 1, 0, -1, -2, -3];
|
|
|
|
// Single-line case.
|
|
let _ = v.iter().find(|&x| *x < 0);
|
|
}
|