2023-04-20 09:37:15 -05:00
|
|
|
//@run-rustfix
|
2020-10-23 02:49:47 -05:00
|
|
|
|
|
|
|
#![warn(clippy::filter_next)]
|
2023-06-06 15:56:57 -05:00
|
|
|
#![allow(clippy::useless_vec)]
|
2020-10-23 02:49:47 -05:00
|
|
|
|
|
|
|
/// 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);
|
|
|
|
}
|