summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/methods_fixable.fixed
blob: bb06b5a480ff1505e405cfbdee168a84f9747fee (plain)
1
2
3
4
5
6
7
8
9
10
#![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);
}