]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/find_map.stderr
Add 'src/tools/clippy/' from commit 'd2708873ef711ec8ab45df1e984ecf24a96cd369'
[rust.git] / src / tools / clippy / tests / ui / find_map.stderr
1 error: called `find(p).map(q)` on an `Iterator`
2   --> $DIR/find_map.rs:20:26
3    |
4 LL |     let _: Option<i32> = a.iter().find(|s| s.parse::<i32>().is_ok()).map(|s| s.parse().unwrap());
5    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7    = note: `-D clippy::find-map` implied by `-D warnings`
8    = help: this is more succinctly expressed by calling `.find_map(..)` instead
9
10 error: called `find(p).map(q)` on an `Iterator`
11   --> $DIR/find_map.rs:22:29
12    |
13 LL |       let _: Option<Flavor> = desserts_of_the_week
14    |  _____________________________^
15 LL | |         .iter()
16 LL | |         .find(|dessert| match *dessert {
17 LL | |             Dessert::Cake(_) => true,
18 ...  |
19 LL | |             _ => unreachable!(),
20 LL | |         });
21    | |__________^
22    |
23    = help: this is more succinctly expressed by calling `.find_map(..)` instead
24
25 error: aborting due to 2 previous errors
26