2020-11-23 12:51:04 +00:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-06-11 19:56:14 +00:00
|
|
|
--> tests/ui/search_is_some.rs:16:13
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|&x| {
|
|
|
|
| _____________^
|
|
|
|
LL | | *x < 0
|
|
|
|
LL | | }
|
|
|
|
LL | | ).is_some();
|
|
|
|
| |______________________________^
|
|
|
|
|
|
|
|
|
= help: this is more succinctly expressed by calling `any()`
|
2022-09-22 16:04:22 +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)]`
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `position`
|
2024-06-11 19:56:14 +00:00
|
|
|
--> tests/ui/search_is_some.rs:22:13
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().position(|&x| {
|
|
|
|
| _____________^
|
|
|
|
LL | | x < 0
|
|
|
|
LL | | }
|
|
|
|
LL | | ).is_some();
|
|
|
|
| |______________________________^
|
|
|
|
|
|
|
|
|
= help: this is more succinctly expressed by calling `any()`
|
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `rposition`
|
2024-06-11 19:56:14 +00:00
|
|
|
--> tests/ui/search_is_some.rs:28:13
|
2020-11-23 12:51:04 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().rposition(|&x| {
|
|
|
|
| _____________^
|
|
|
|
LL | | x < 0
|
|
|
|
LL | | }
|
|
|
|
LL | | ).is_some();
|
|
|
|
| |______________________________^
|
|
|
|
|
|
|
|
|
= help: this is more succinctly expressed by calling `any()`
|
|
|
|
|
2021-12-06 11:33:31 +00:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2024-06-11 19:56:14 +00:00
|
|
|
--> tests/ui/search_is_some.rs:43:20
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(some_closure).is_some();
|
2024-01-12 21:48:19 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(some_closure)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
2021-03-25 18:29:11 +00:00
|
|
|
error: called `is_none()` after searching an `Iterator` with `find`
|
2024-06-11 19:56:14 +00:00
|
|
|
--> tests/ui/search_is_some.rs:53:13
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|&x| {
|
|
|
|
| _____________^
|
|
|
|
LL | | *x < 0
|
|
|
|
LL | | }
|
|
|
|
LL | | ).is_none();
|
|
|
|
| |______________________________^
|
|
|
|
|
|
|
|
|
= help: this is more succinctly expressed by calling `any()` with negation
|
|
|
|
|
|
|
|
error: called `is_none()` after searching an `Iterator` with `position`
|
2024-06-11 19:56:14 +00:00
|
|
|
--> tests/ui/search_is_some.rs:59:13
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().position(|&x| {
|
|
|
|
| _____________^
|
|
|
|
LL | | x < 0
|
|
|
|
LL | | }
|
|
|
|
LL | | ).is_none();
|
|
|
|
| |______________________________^
|
|
|
|
|
|
|
|
|
= help: this is more succinctly expressed by calling `any()` with negation
|
|
|
|
|
|
|
|
error: called `is_none()` after searching an `Iterator` with `rposition`
|
2024-06-11 19:56:14 +00:00
|
|
|
--> tests/ui/search_is_some.rs:65:13
|
2021-03-25 18:29:11 +00:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().rposition(|&x| {
|
|
|
|
| _____________^
|
|
|
|
LL | | x < 0
|
|
|
|
LL | | }
|
|
|
|
LL | | ).is_none();
|
|
|
|
| |______________________________^
|
|
|
|
|
|
|
|
|
= help: this is more succinctly expressed by calling `any()` with negation
|
|
|
|
|
2021-12-06 11:33:31 +00:00
|
|
|
error: called `is_none()` after searching an `Iterator` with `find`
|
2024-06-11 19:56:14 +00:00
|
|
|
--> tests/ui/search_is_some.rs:80:13
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(some_closure).is_none();
|
2024-01-12 21:48:19 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `!(0..1).any(some_closure)`
|
2021-12-06 11:33:31 +00:00
|
|
|
|
|
|
|
error: aborting due to 8 previous errors
|
2020-11-23 12:51:04 +00:00
|
|
|
|