2020-11-11 00:48:01 -06:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:10:22
|
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|&x| *x < 0).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|x| *x < 0)`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
|
|
|
|
= note: `-D clippy::search-is-some` implied by `-D warnings`
|
|
|
|
|
2020-11-11 00:48:01 -06:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:11:20
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| **y == *x).is_some(); // one dereference less
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|x| **y == x)`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-11 00:48:01 -06:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:12:20
|
|
|
|
|
|
|
|
|
LL | let _ = (0..1).find(|x| *x == 0).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|x| x == 0)`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-11 00:48:01 -06:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `find`
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:13:22
|
|
|
|
|
|
|
|
|
LL | let _ = v.iter().find(|x| **x == 0).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|x| *x == 0)`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-11 00:48:01 -06:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `position`
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:16:22
|
|
|
|
|
|
|
|
|
LL | let _ = v.iter().position(|&x| x < 0).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|&x| x < 0)`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-11 00:48:01 -06:00
|
|
|
error: called `is_some()` after searching an `Iterator` with `rposition`
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:19:22
|
|
|
|
|
|
|
|
|
LL | let _ = v.iter().rposition(|&x| x < 0).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `any()` instead: `any(|&x| x < 0)`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-07 01:21:22 -06:00
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:24:27
|
|
|
|
|
|
|
|
|
LL | let _ = "hello world".find("world").is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains("world")`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-07 01:21:22 -06:00
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:25:27
|
|
|
|
|
|
|
|
|
LL | let _ = "hello world".find(&s2).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2)`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-07 01:21:22 -06:00
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:26:27
|
|
|
|
|
|
|
|
|
LL | let _ = "hello world".find(&s2[2..]).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2[2..])`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-07 01:21:22 -06:00
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:28:16
|
|
|
|
|
|
|
|
|
LL | let _ = s1.find("world").is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains("world")`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-07 01:21:22 -06:00
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:29:16
|
|
|
|
|
|
|
|
|
LL | let _ = s1.find(&s2).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2)`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-07 01:21:22 -06:00
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:30:16
|
|
|
|
|
|
|
|
|
LL | let _ = s1.find(&s2[2..]).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2[2..])`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-07 01:21:22 -06:00
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:32:21
|
|
|
|
|
|
|
|
|
LL | let _ = s1[2..].find("world").is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains("world")`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-07 01:21:22 -06:00
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:33:21
|
|
|
|
|
|
|
|
|
LL | let _ = s1[2..].find(&s2).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2)`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
2020-11-07 01:21:22 -06:00
|
|
|
error: called `is_some()` after calling `find()` on a string
|
2020-10-17 16:28:00 -05:00
|
|
|
--> $DIR/search_is_some_fixable.rs:34:21
|
|
|
|
|
|
|
|
|
LL | let _ = s1[2..].find(&s2[2..]).is_some();
|
2020-11-07 01:21:22 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `contains()` instead: `contains(&s2[2..])`
|
2020-10-17 16:28:00 -05:00
|
|
|
|
|
|
|
error: aborting due to 15 previous errors
|
|
|
|
|