diff options
Diffstat (limited to 'tests/ui/manual_find.stderr')
| -rw-r--r-- | tests/ui/manual_find.stderr | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/ui/manual_find.stderr b/tests/ui/manual_find.stderr index ea04bb066e6..41aa00a8bc1 100644 --- a/tests/ui/manual_find.stderr +++ b/tests/ui/manual_find.stderr @@ -2,9 +2,10 @@ error: manual implementation of `Iterator::find` --> $DIR/manual_find.rs:5:5 | LL | / for s in strings { +LL | | +LL | | LL | | if s == String::new() { -LL | | return Some(s); -LL | | } +... | LL | | } LL | | None | |________^ help: replace with an iterator: `strings.into_iter().find(|s| s == String::new())` @@ -13,12 +14,13 @@ LL | | None = note: `-D clippy::manual-find` implied by `-D warnings` error: manual implementation of `Iterator::find` - --> $DIR/manual_find.rs:14:5 + --> $DIR/manual_find.rs:16:5 | LL | / for (s, _) in arr { +LL | | +LL | | LL | | if s == String::new() { -LL | | return Some(s); -LL | | } +... | LL | | } LL | | None | |________^ help: replace with an iterator: `arr.into_iter().map(|(s, _)| s).find(|s| s == String::new())` |
