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(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead.
12 --> $DIR/methods.rs:126:13
14 LL | let _ = v.iter().filter(|&x| *x < 0).next();
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17 = note: `-D clippy::filter-next` implied by `-D warnings`
18 = note: replace `filter(|&x| *x < 0).next()` with `find(|&x| *x < 0)`
20 error: called `filter(p).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(p)` instead.
21 --> $DIR/methods.rs:129:13
23 LL | let _ = v.iter().filter(|&x| {
28 | |___________________________^
30 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
31 --> $DIR/methods.rs:146:22
33 LL | let _ = v.iter().find(|&x| *x < 0).is_some();
34 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| *x < 0)`
36 = note: `-D clippy::search-is-some` implied by `-D warnings`
38 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
39 --> $DIR/methods.rs:147:20
41 LL | let _ = (0..1).find(|x| **y == *x).is_some(); // one dereference less
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| **y == x)`
44 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
45 --> $DIR/methods.rs:148:20
47 LL | let _ = (0..1).find(|x| *x == 0).is_some();
48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| x == 0)`
50 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
51 --> $DIR/methods.rs:149:22
53 LL | let _ = v.iter().find(|x| **x == 0).is_some();
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|x| *x == 0)`
56 error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
57 --> $DIR/methods.rs:152:13
59 LL | let _ = v.iter().find(|&x| {
64 | |______________________________^
66 error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
67 --> $DIR/methods.rs:158:22
69 LL | let _ = v.iter().position(|&x| x < 0).is_some();
70 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
72 error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
73 --> $DIR/methods.rs:161:13
75 LL | let _ = v.iter().position(|&x| {
80 | |______________________________^
82 error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
83 --> $DIR/methods.rs:167:22
85 LL | let _ = v.iter().rposition(|&x| x < 0).is_some();
86 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `any(|&x| x < 0)`
88 error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
89 --> $DIR/methods.rs:170:13
91 LL | let _ = v.iter().rposition(|&x| {
96 | |______________________________^
98 error: aborting due to 12 previous errors