]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/filter_map_next_fixable.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / filter_map_next_fixable.stderr
CommitLineData
f20569fa 1error: called `filter_map(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find_map(..)` instead
487cf647 2 --> $DIR/filter_map_next_fixable.rs:9:32
f20569fa
XL
3 |
4LL | let element: Option<i32> = a.iter().filter_map(|s| s.parse().ok()).next();
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `a.iter().find_map(|s| s.parse().ok())`
6 |
7 = note: `-D clippy::filter-map-next` implied by `-D warnings`
8
2b03887a 9error: called `filter_map(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find_map(..)` instead
487cf647 10 --> $DIR/filter_map_next_fixable.rs:22:26
2b03887a
FG
11 |
12LL | let _: Option<i32> = a.iter().filter_map(|s| s.parse().ok()).next();
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `a.iter().find_map(|s| s.parse().ok())`
14
15error: aborting due to 2 previous errors
f20569fa 16