mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-13 00:56:14 +00:00
89 lines
3.1 KiB
Plaintext
89 lines
3.1 KiB
Plaintext
error: called `is_some()` after searching an `Iterator` with `find`
|
|
--> tests/ui/search_is_some.rs:16:13
|
|
|
|
|
LL | let _ = v.iter().find(|&x| {
|
|
| _____________^
|
|
LL | | *x < 0
|
|
LL | | }
|
|
LL | | ).is_some();
|
|
| |______________________________^
|
|
|
|
|
= help: this is more succinctly expressed by calling `any()`
|
|
= note: `-D clippy::search-is-some` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::search_is_some)]`
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `position`
|
|
--> tests/ui/search_is_some.rs:22:13
|
|
|
|
|
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`
|
|
--> tests/ui/search_is_some.rs:28:13
|
|
|
|
|
LL | let _ = v.iter().rposition(|&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 `find`
|
|
--> tests/ui/search_is_some.rs:43:20
|
|
|
|
|
LL | let _ = (0..1).find(some_closure).is_some();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `any(some_closure)`
|
|
|
|
error: called `is_none()` after searching an `Iterator` with `find`
|
|
--> tests/ui/search_is_some.rs:53:13
|
|
|
|
|
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`
|
|
--> tests/ui/search_is_some.rs:59:13
|
|
|
|
|
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`
|
|
--> tests/ui/search_is_some.rs:65:13
|
|
|
|
|
LL | let _ = v.iter().rposition(|&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 `find`
|
|
--> tests/ui/search_is_some.rs:80:13
|
|
|
|
|
LL | let _ = (0..1).find(some_closure).is_none();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `!(0..1).any(some_closure)`
|
|
|
|
error: aborting due to 8 previous errors
|
|
|