You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #4316 - phansch:method_rs_cleanup2, r=flip1995
UI Test Cleanup: No wrong_self_convention in methods.rs
These cases are already covered in `tests/ui/wrong_self_convention.rs`.
cc #2038
changelog: none
error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
161
-
--> $DIR/methods.rs:251:13
141
+
--> $DIR/methods.rs:252:13
162
142
|
163
143
LL | let _ = v.iter().find(|&x| {
164
144
| _____________^
@@ -168,15 +148,15 @@ LL | | ).is_some();
168
148
| |______________________________^
169
149
170
150
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
171
-
--> $DIR/methods.rs:257:13
151
+
--> $DIR/methods.rs:258:13
172
152
|
173
153
LL | let _ = v.iter().position(|&x| x < 0).is_some();
174
154
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
175
155
|
176
156
= note: replace `position(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
177
157
178
158
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
179
-
--> $DIR/methods.rs:260:13
159
+
--> $DIR/methods.rs:261:13
180
160
|
181
161
LL | let _ = v.iter().position(|&x| {
182
162
| _____________^
@@ -186,15 +166,15 @@ LL | | ).is_some();
186
166
| |______________________________^
187
167
188
168
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
189
-
--> $DIR/methods.rs:266:13
169
+
--> $DIR/methods.rs:267:13
190
170
|
191
171
LL | let _ = v.iter().rposition(|&x| x < 0).is_some();
192
172
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
193
173
|
194
174
= note: replace `rposition(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
195
175
196
176
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
197
-
--> $DIR/methods.rs:269:13
177
+
--> $DIR/methods.rs:270:13
198
178
|
199
179
LL | let _ = v.iter().rposition(|&x| {
200
180
| _____________^
@@ -204,12 +184,12 @@ LL | | ).is_some();
204
184
| |______________________________^
205
185
206
186
error: used unwrap() on an Option value. If you don't want to handle the None case gracefully, consider using expect() to provide a better panic message
207
-
--> $DIR/methods.rs:284:13
187
+
--> $DIR/methods.rs:285:13
208
188
|
209
189
LL | let _ = opt.unwrap();
210
190
| ^^^^^^^^^^^^
211
191
|
212
192
= note: `-D clippy::option-unwrap-used` implied by `-D warnings`
0 commit comments