2020-11-10 23:48:01 -07:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2021-03-20 14:30:45 +01:00
|
|
|
--> $DIR/search_is_some.rs:14:13
|
2020-10-17 14:28:00 -07:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|&x| {
|
|
|
|
| _____________^
|
|
|
|
LL | | *x < 0
|
|
|
|
LL | | }
|
|
|
|
LL | | ).is_some();
|
|
|
|
| |______________________________^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::search-is-some` implied by `-D warnings`
|
2020-11-07 00:21:22 -07:00
|
|
|
= help: this is more succinctly expressed by calling `any()`
|
2020-10-17 14:28:00 -07:00
|
|
|
|
2020-11-10 23:48:01 -07:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `position`
|
2021-03-20 14:30:45 +01:00
|
|
|
--> $DIR/search_is_some.rs:20:13
|
2020-10-17 14:28:00 -07:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().position(|&x| {
|
|
|
|
| _____________^
|
|
|
|
LL | | x < 0
|
|
|
|
LL | | }
|
|
|
|
LL | | ).is_some();
|
|
|
|
| |______________________________^
|
2020-11-07 00:21:22 -07:00
|
|
|
|
|
|
|
|
= help: this is more succinctly expressed by calling `any()`
|
2020-10-17 14:28:00 -07:00
|
|
|
|
2020-11-10 23:48:01 -07:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `rposition`
|
2021-03-20 14:30:45 +01:00
|
|
|
--> $DIR/search_is_some.rs:26:13
|
2020-10-17 14:28:00 -07:00
|
|
|
|
|
|
|
|
LL | let _ = v.iter().rposition(|&x| {
|
|
|
|
| _____________^
|
|
|
|
LL | | x < 0
|
|
|
|
LL | | }
|
|
|
|
LL | | ).is_some();
|
|
|
|
| |______________________________^
|
2020-11-07 00:21:22 -07:00
|
|
|
|
|
|
|
|
= help: this is more succinctly expressed by calling `any()`
|
2020-10-17 14:28:00 -07:00
|
|
|
|
2021-08-09 12:00:35 +02:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
|
|
|
--> $DIR/search_is_some.rs:41:20
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| **y == *x).is_some(); // one dereference less
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `any()` instead
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).any(|x| **y == *x); // one dereference less
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
help: ...and remove deref
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| **y == x).is_some(); // one dereference less
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
|
|
|
--> $DIR/search_is_some.rs:42:20
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| *x == 0).is_some();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `any()` instead
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).any(|x| *x == 0);
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
help: ...and remove deref
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| x == 0).is_some();
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
|
|
|
--> $DIR/search_is_some.rs:43:22
|
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x| **x == 0).is_some();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `any()` instead
|
|
|
|
|
|
|
|
|
LL | let _ = v.iter().any(|x| **x == 0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^
|
|
|
|
help: ...and remove deref
|
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x| *x == 0).is_some();
|
|
|
|
| ^^
|
|
|
|
|
2021-03-20 14:30:45 +01:00
|
|
|
error: called `is_none()` after searching an `Iterator` with `find`
|
2021-08-09 12:00:35 +02:00
|
|
|
--> $DIR/search_is_some.rs:53:13
|
2021-03-20 14:30:45 +01: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`
|
2021-08-09 12:00:35 +02:00
|
|
|
--> $DIR/search_is_some.rs:59:13
|
2021-03-20 14:30:45 +01: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`
|
2021-08-09 12:00:35 +02:00
|
|
|
--> $DIR/search_is_some.rs:65:13
|
2021-03-20 14:30:45 +01: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-08-09 12:00:35 +02:00
|
|
|
error: called `is_none()` after searching an `Iterator` with `find`
|
|
|
|
--> $DIR/search_is_some.rs:80:13
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| **y == *x).is_none(); // one dereference less
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `!_.any()` instead
|
|
|
|
|
|
|
|
|
LL | let _ = !(0..1).any(|x| **y == *x); // one dereference less
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: ...and remove deref
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| **y == x).is_none(); // one dereference less
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: called `is_none()` after searching an `Iterator` with `find`
|
|
|
|
--> $DIR/search_is_some.rs:81:13
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| *x == 0).is_none();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `!_.any()` instead
|
|
|
|
|
|
|
|
|
LL | let _ = !(0..1).any(|x| *x == 0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: ...and remove deref
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| x == 0).is_none();
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: called `is_none()` after searching an `Iterator` with `find`
|
|
|
|
--> $DIR/search_is_some.rs:82:13
|
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x| **x == 0).is_none();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `!_.any()` instead
|
|
|
|
|
|
|
|
|
LL | let _ = !v.iter().any(|x| **x == 0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: ...and remove deref
|
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x| *x == 0).is_none();
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: called `is_none()` after searching an `Iterator` with `find`
|
|
|
|
--> $DIR/search_is_some.rs:98:25
|
|
|
|
|
|
|
|
|
LL | .filter(|c| filter_hand.iter().find(|cc| c == cc).is_none())
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `!_.any()` instead
|
|
|
|
|
|
|
|
|
LL | .filter(|c| !filter_hand.iter().any(|cc| c == cc))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: ...and borrow variable
|
|
|
|
|
|
|
|
|
LL | .filter(|c| filter_hand.iter().find(|cc| c == &cc).is_none())
|
|
|
|
| ^^^
|
|
|
|
|
|
|
|
error: called `is_none()` after searching an `Iterator` with `find`
|
|
|
|
--> $DIR/search_is_some.rs:114:30
|
|
|
|
|
|
|
|
|
LL | .filter(|(c, _)| filter_hand.iter().find(|cc| c == *cc).is_none())
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: use `!_.any()` instead
|
|
|
|
|
|
|
|
|
LL | .filter(|(c, _)| !filter_hand.iter().any(|cc| c == *cc))
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
help: ...and remove deref
|
|
|
|
|
|
|
|
|
LL | .filter(|(c, _)| filter_hand.iter().find(|cc| c == cc).is_none())
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
error: aborting due to 14 previous errors
|
2020-10-17 14:28:00 -07:00
|
|
|
|