2021-12-06 11:33:31 +00:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:9:22
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|&x| *x < 0).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| *x < 0)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::search-is-some` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::search_is_some)]`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:10:20
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| **y == *x).is_some(); // one dereference less
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| **y == x)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:11:20
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| *x == 0).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| x == 0)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:12:22
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x| **x == 0).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| *x == 0)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:13:20
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (4..5).find(|x| *x == 1 || *x == 3 || *x == 5).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| x == 1 || x == 3 || x == 5)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:14:20
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (1..3).find(|x| [1, 2, 3].contains(x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| [1, 2, 3].contains(&x))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:15:20
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (1..3).find(|x| *x == 0 || [1, 2, 3].contains(x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| x == 0 || [1, 2, 3].contains(&x))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:16:20
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (1..3).find(|x| [1, 2, 3].contains(x) || *x == 0).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| [1, 2, 3].contains(&x) || x == 0)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:18:10
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | .find(|x| [1, 2, 3].contains(x) || *x == 0 || [4, 5, 6].contains(x) || *x == -1)
|
|
|
|
| __________^
|
|
|
|
LL | | .is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| |__________________^ help: consider using: `any(|x| [1, 2, 3].contains(&x) || x == 0 || [4, 5, 6].contains(&x) || x == -1)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `position`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:22:22
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().position(|&x| x < 0).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|&x| x < 0)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `rposition`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:25:22
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().rposition(|&x| x < 0).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|&x| x < 0)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:30:27
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hello world".find("world").is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `contains("world")`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:31:27
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hello world".find(&s2).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `contains(&s2)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:32:27
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = "hello world".find(&s2[2..]).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `contains(&s2[2..])`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:34:16
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = s1.find("world").is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `contains("world")`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:35:16
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = s1.find(&s2).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `contains(&s2)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:36:16
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = s1.find(&s2[2..]).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `contains(&s2[2..])`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:38:21
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = s1[2..].find("world").is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `contains("world")`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:39:21
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = s1[2..].find(&s2).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: consider using: `contains(&s2)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:40:21
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = s1[2..].find(&s2[2..]).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `contains(&s2[2..])`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:56:44
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | .filter(|c| filter_hand.iter().find(|cc| c == cc).is_some())
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|cc| c == &cc)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:72:49
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | .filter(|(c, _)| filter_hand.iter().find(|cc| c == *cc).is_some())
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|cc| c == cc)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:83:29
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = vfoo.iter().find(|v| v.foo == 1 && v.bar == 2).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|v| v.foo == 1 && v.bar == 2)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:88:14
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | .find(|(i, v)| *i == 42 && v.foo == 1 && v.bar == 2)
|
|
|
|
| ______________^
|
|
|
|
LL | | .is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| |______________________^ help: consider using: `any(|(i, v)| *i == 42 && v.foo == 1 && v.bar == 2)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:94:29
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = vfoo.iter().find(|a| a[0] == 42).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|a| a[0] == 42)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:100:29
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = vfoo.iter().find(|sub| sub[1..4].len() == 3).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|sub| sub[1..4].len() == 3)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:118:30
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = [ppx].iter().find(|ppp_x: &&&u32| please(**ppp_x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|ppp_x: &&u32| please(ppp_x))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:119:50
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = [String::from("Hey hey")].iter().find(|s| s.len() == 2).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|s| s.len() == 2)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:122:26
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x| deref_enough(**x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| deref_enough(*x))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:123:26
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x: &&u32| deref_enough(**x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x: &u32| deref_enough(*x))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:126:26
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x| arg_no_deref(x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| arg_no_deref(&x))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:128:26
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x: &&u32| arg_no_deref(x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x: &u32| arg_no_deref(&x))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:150:14
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | .find(|v| v.inner_double.bar[0][0] == 2 && v.inner.bar[0] == 2)
|
|
|
|
| ______________^
|
|
|
|
LL | | .is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| |______________________^ help: consider using: `any(|v| v.inner_double.bar[0][0] == 2 && v.inner.bar[0] == 2)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:164:29
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = vfoo.iter().find(|v| v.inner[0].bar == 2).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|v| v.inner[0].bar == 2)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:169:29
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = vfoo.iter().find(|x| (**x)[0] == 9).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x| (**x)[0] == 9)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:182:29
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = vfoo.iter().find(|v| v.by_ref(&v.bar)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|v| v.by_ref(&v.bar))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:186:55
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = [&(&1, 2), &(&3, 4), &(&5, 4)].iter().find(|(&x, y)| x == *y).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|(&x, y)| x == *y)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:187:55
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = [&(&1, 2), &(&3, 4), &(&5, 4)].iter().find(|&(&x, y)| x == *y).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|(&x, y)| x == *y)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:206:26
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|s| s[0].is_empty()).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|s| s[0].is_empty())`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:207:26
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|s| test_string_1(&s[0])).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|s| test_string_1(&s[0]))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:216:26
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|fp| fp.field.is_power_of_two()).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|fp| fp.field.is_power_of_two())`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:217:26
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|fp| test_u32_1(fp.field)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|fp| test_u32_1(fp.field))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:218:26
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|fp| test_u32_2(*fp.field)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|fp| test_u32_2(*fp.field))`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
2022-07-18 07:39:37 +00:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:233:18
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | v.iter().find(|x: &&u32| func(x)).is_some()
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x: &u32| func(&x))`
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:242:26
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x: &&u32| arg_no_deref_impl(x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x: &u32| arg_no_deref_impl(&x))`
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:245:26
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x: &&u32| arg_no_deref_dyn(x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x: &u32| arg_no_deref_dyn(&x))`
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/search_is_some_fixable_some.rs:248:26
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x: &&u32| (*arg_no_deref_dyn)(x)).is_some();
|
2024-01-25 18:17:36 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(|x: &u32| (*arg_no_deref_dyn)(&x))`
|
2022-07-18 07:39:37 +00:00
|
|
|
|
|
|
|
error: aborting due to 47 previous errors
|
2021-12-06 11:33:31 +00:00
|
|
|
|