summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/methods_fixable.fixed
blob: ee7c1b0da6d979cb7d0213574864d4d0833ab2b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
// run-rustfix

#![warn(clippy::filter_next)]

/// 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);
}