1 error: manual implementation of `Iterator::find`
2 --> $DIR/manual_find_fixable.rs:11:5
4 LL | / for &v in ARRAY {
10 | |________^ help: replace with an iterator: `ARRAY.iter().find(|&&v| v == n).copied()`
12 = note: `-D clippy::manual-find` implied by `-D warnings`
14 error: manual implementation of `Iterator::find`
15 --> $DIR/manual_find_fixable.rs:20:5
17 LL | / for (a, _) in arr {
18 LL | | if a % 2 == 0 {
19 LL | | return Some(a);
23 | |________^ help: replace with an iterator: `arr.into_iter().map(|(a, _)| a).find(|&a| a % 2 == 0)`
25 error: manual implementation of `Iterator::find`
26 --> $DIR/manual_find_fixable.rs:33:5
28 LL | / for el in arr {
29 LL | | if el.name.len() == 10 {
30 LL | | return Some(el);
34 | |________^ help: replace with an iterator: `arr.into_iter().find(|el| el.name.len() == 10)`
36 = note: you may need to dereference some variables
38 error: manual implementation of `Iterator::find`
39 --> $DIR/manual_find_fixable.rs:43:5
41 LL | / for Tuple(a, _) in arr {
43 LL | | return Some(a);
47 | |________^ help: replace with an iterator: `arr.into_iter().map(|Tuple(a, _)| a).find(|&a| a >= 3)`
49 error: manual implementation of `Iterator::find`
50 --> $DIR/manual_find_fixable.rs:58:5
52 LL | / for el in arr {
53 LL | | if el.should_keep() {
54 LL | | return Some(el);
58 | |________^ help: replace with an iterator: `arr.into_iter().find(|el| el.should_keep())`
60 = note: you may need to dereference some variables
62 error: manual implementation of `Iterator::find`
63 --> $DIR/manual_find_fixable.rs:68:5
65 LL | / for el in arr {
66 LL | | if f(el) == 20 {
67 LL | | return Some(el);
71 | |________^ help: replace with an iterator: `arr.into_iter().find(|&el| f(el) == 20)`
73 error: manual implementation of `Iterator::find`
74 --> $DIR/manual_find_fixable.rs:78:5
76 LL | / for &el in arr.values() {
78 LL | | return Some(el);
82 | |________^ help: replace with an iterator: `arr.values().find(|&&el| f(el)).copied()`
84 error: manual implementation of `Iterator::find`
85 --> $DIR/manual_find_fixable.rs:87:5
87 LL | / for el in arr {
88 LL | | if el.is_true {
89 LL | | return Some(el);
93 | |________^ help: replace with an iterator: `arr.into_iter().find(|el| el.is_true)`
95 = note: you may need to dereference some variables
97 error: manual implementation of `Iterator::find`
98 --> $DIR/manual_find_fixable.rs:117:5
100 LL | / for (_, &x) in v {
102 LL | | return Some(x);
106 | |________^ help: replace with an iterator: `v.into_iter().map(|(_, &x)| x).find(|&x| x > 10)`
108 error: manual implementation of `Iterator::find`
109 --> $DIR/manual_find_fixable.rs:126:5
111 LL | / for &(_, &x) in v {
113 LL | | return Some(x);
117 | |________^ help: replace with an iterator: `v.iter().map(|&(_, &x)| x).find(|&x| x > 10)`
119 error: manual implementation of `Iterator::find`
120 --> $DIR/manual_find_fixable.rs:135:5
122 LL | / for x in arr {
124 LL | | return Some(x);
128 | |________________^ help: replace with an iterator: `arr.into_iter().find(|&x| x >= 5)`
130 error: manual implementation of `Iterator::find`
131 --> $DIR/manual_find_fixable.rs:190:9
133 LL | / for x in arr {
135 LL | | return Some(x);
139 | |____________^ help: replace with an iterator: `arr.into_iter().find(|&x| x < 1)`
141 error: aborting due to 12 previous errors