]> git.lizzy.rs Git - rust.git/blob - tests/ui/manual_find_map.stderr
Auto merge of #85538 - r00ster91:iterrepeat, r=Mark-Simulacrum
[rust.git] / tests / ui / manual_find_map.stderr
1 error: `find(..).map(..)` can be simplified as `find_map(..)`
2   --> $DIR/manual_find_map.rs:8:19
3    |
4 LL |     let _ = (0..).find(|n| to_opt(*n).is_some()).map(|a| to_opt(a).unwrap());
5    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `find_map(|a| to_opt(a))`
6    |
7    = note: `-D clippy::manual-find-map` implied by `-D warnings`
8
9 error: `find(..).map(..)` can be simplified as `find_map(..)`
10   --> $DIR/manual_find_map.rs:11:19
11    |
12 LL |     let _ = (0..).find(|&n| to_opt(n).is_some()).map(|a| to_opt(a).expect("hi"));
13    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `find_map(|a| to_opt(a))`
14
15 error: `find(..).map(..)` can be simplified as `find_map(..)`
16   --> $DIR/manual_find_map.rs:14:19
17    |
18 LL |     let _ = (0..).find(|&n| to_res(n).is_ok()).map(|a| to_res(a).unwrap_or(1));
19    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `find_map(|a| to_res(a).ok())`
20
21 error: aborting due to 3 previous errors
22