]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/manual_find.stderr
Rollup merge of #98111 - eggyal:issue-97982, r=GuillaumeGomez
[rust.git] / src / tools / clippy / tests / ui / manual_find.stderr
1 error: manual implementation of `Iterator::find`
2   --> $DIR/manual_find.rs:5:5
3    |
4 LL | /     for s in strings {
5 LL | |         if s == String::new() {
6 LL | |             return Some(s);
7 LL | |         }
8 LL | |     }
9 LL | |     None
10    | |________^ help: replace with an iterator: `strings.into_iter().find(|s| s == String::new())`
11    |
12    = note: `-D clippy::manual-find` implied by `-D warnings`
13    = note: you may need to dereference some variables
14
15 error: manual implementation of `Iterator::find`
16   --> $DIR/manual_find.rs:14:5
17    |
18 LL | /     for (s, _) in arr {
19 LL | |         if s == String::new() {
20 LL | |             return Some(s);
21 LL | |         }
22 LL | |     }
23 LL | |     None
24    | |________^ help: replace with an iterator: `arr.into_iter().map(|(s, _)| s).find(|s| s == String::new())`
25    |
26    = note: you may need to dereference some variables
27
28 error: aborting due to 2 previous errors
29