1 error: methods called `new` usually return `Self`
2 --> $DIR/methods.rs:105:5
4 LL | / fn new() -> i32 {
9 = note: `-D clippy::new-ret-no-self` implied by `-D warnings`
11 error: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead.
12 --> $DIR/methods.rs:126:13
14 LL | let _ = v.iter().filter(|&x| {
19 | |___________________________^
21 = note: `-D clippy::filter-next` implied by `-D warnings`
23 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
24 --> $DIR/methods.rs:143:22
26 LL | let _ = v.iter().find(|&x| *x < 0).is_some();
27 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| *x < 0)`
29 = note: `-D clippy::search-is-some` implied by `-D warnings`
31 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
32 --> $DIR/methods.rs:144:20
34 LL | let _ = (0..1).find(|x| **y == *x).is_some(); // one dereference less
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| **y == x)`
37 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
38 --> $DIR/methods.rs:145:20
40 LL | let _ = (0..1).find(|x| *x == 0).is_some();
41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| x == 0)`
43 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
44 --> $DIR/methods.rs:146:22
46 LL | let _ = v.iter().find(|x| **x == 0).is_some();
47 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| *x == 0)`
49 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
50 --> $DIR/methods.rs:149:13
52 LL | let _ = v.iter().find(|&x| {
57 | |______________________________^
59 error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
60 --> $DIR/methods.rs:155:22
62 LL | let _ = v.iter().position(|&x| x < 0).is_some();
63 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
65 error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
66 --> $DIR/methods.rs:158:13
68 LL | let _ = v.iter().position(|&x| {
73 | |______________________________^
75 error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
76 --> $DIR/methods.rs:164:22
78 LL | let _ = v.iter().rposition(|&x| x < 0).is_some();
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
81 error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
82 --> $DIR/methods.rs:167:13
84 LL | let _ = v.iter().rposition(|&x| {
89 | |______________________________^