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
error: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`.
185
-
--> $DIR/methods.rs:260:13
185
+
--> $DIR/methods.rs:246:13
186
186
|
187
187
LL | let _ = v.iter().find(|&x| {
188
188
| _____________^
@@ -192,15 +192,15 @@ LL | | ).is_some();
192
192
| |______________________________^
193
193
194
194
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
195
-
--> $DIR/methods.rs:266:13
195
+
--> $DIR/methods.rs:252:13
196
196
|
197
197
LL | let _ = v.iter().position(|&x| x < 0).is_some();
198
198
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
199
199
|
200
200
= note: replace `position(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
201
201
202
202
error: called `is_some()` after searching an `Iterator` with position. This is more succinctly expressed by calling `any()`.
203
-
--> $DIR/methods.rs:269:13
203
+
--> $DIR/methods.rs:255:13
204
204
|
205
205
LL | let _ = v.iter().position(|&x| {
206
206
| _____________^
@@ -210,15 +210,15 @@ LL | | ).is_some();
210
210
| |______________________________^
211
211
212
212
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
213
-
--> $DIR/methods.rs:275:13
213
+
--> $DIR/methods.rs:261:13
214
214
|
215
215
LL | let _ = v.iter().rposition(|&x| x < 0).is_some();
216
216
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
217
217
|
218
218
= note: replace `rposition(|&x| x < 0).is_some()` with `any(|&x| x < 0)`
219
219
220
220
error: called `is_some()` after searching an `Iterator` with rposition. This is more succinctly expressed by calling `any()`.
221
-
--> $DIR/methods.rs:278:13
221
+
--> $DIR/methods.rs:264:13
222
222
|
223
223
LL | let _ = v.iter().rposition(|&x| {
224
224
| _____________^
@@ -227,57 +227,13 @@ LL | | }
227
227
LL | | ).is_some();
228
228
| |______________________________^
229
229
230
-
error: called `.iter().nth()` on a Vec. Calling `.get()` is both faster and more readable
231
-
--> $DIR/methods.rs:298:23
232
-
|
233
-
LL | let bad_vec = some_vec.iter().nth(3);
234
-
| ^^^^^^^^^^^^^^^^^^^^^^
235
-
|
236
-
= note: `-D clippy::iter-nth` implied by `-D warnings`
237
-
238
-
error: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable
239
-
--> $DIR/methods.rs:299:26
240
-
|
241
-
LL | let bad_slice = &some_vec[..].iter().nth(3);
242
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
243
-
244
-
error: called `.iter().nth()` on a slice. Calling `.get()` is both faster and more readable
245
-
--> $DIR/methods.rs:300:31
246
-
|
247
-
LL | let bad_boxed_slice = boxed_slice.iter().nth(3);
248
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
249
-
250
-
error: called `.iter().nth()` on a VecDeque. Calling `.get()` is both faster and more readable
251
-
--> $DIR/methods.rs:301:29
252
-
|
253
-
LL | let bad_vec_deque = some_vec_deque.iter().nth(3);
254
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
255
-
256
-
error: called `.iter_mut().nth()` on a Vec. Calling `.get_mut()` is both faster and more readable
257
-
--> $DIR/methods.rs:306:23
258
-
|
259
-
LL | let bad_vec = some_vec.iter_mut().nth(3);
260
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
261
-
262
-
error: called `.iter_mut().nth()` on a slice. Calling `.get_mut()` is both faster and more readable
263
-
--> $DIR/methods.rs:309:26
264
-
|
265
-
LL | let bad_slice = &some_vec[..].iter_mut().nth(3);
266
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
267
-
268
-
error: called `.iter_mut().nth()` on a VecDeque. Calling `.get_mut()` is both faster and more readable
269
-
--> $DIR/methods.rs:312:29
270
-
|
271
-
LL | let bad_vec_deque = some_vec_deque.iter_mut().nth(3);
272
-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
273
-
274
230
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
275
-
--> $DIR/methods.rs:324:13
231
+
--> $DIR/methods.rs:279:13
276
232
|
277
233
LL | let _ = opt.unwrap();
278
234
| ^^^^^^^^^^^^
279
235
|
280
236
= note: `-D clippy::option-unwrap-used` implied by `-D warnings`
0 commit comments