2023-07-02 12:35:19 +00:00
|
|
|
error: called `.iter().nth()` on a `Vec`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth.rs:34:23
|
2019-04-11 05:58:50 +00:00
|
|
|
|
|
|
|
|
LL | let bad_vec = some_vec.iter().nth(3);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2020-01-25 22:01:16 +00:00
|
|
|
= help: calling `.get()` is both faster and more readable
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::iter-nth` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::iter_nth)]`
|
2019-04-11 05:58:50 +00:00
|
|
|
|
2020-01-24 08:04:46 +00:00
|
|
|
error: called `.iter().nth()` on a slice
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth.rs:35:26
|
2019-04-11 05:58:50 +00:00
|
|
|
|
|
|
|
|
LL | let bad_slice = &some_vec[..].iter().nth(3);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-24 08:04:46 +00:00
|
|
|
|
|
2020-01-25 22:01:16 +00:00
|
|
|
= help: calling `.get()` is both faster and more readable
|
2019-04-11 05:58:50 +00:00
|
|
|
|
2020-01-24 08:04:46 +00:00
|
|
|
error: called `.iter().nth()` on a slice
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth.rs:36:31
|
2019-04-11 05:58:50 +00:00
|
|
|
|
|
|
|
|
LL | let bad_boxed_slice = boxed_slice.iter().nth(3);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-24 08:04:46 +00:00
|
|
|
|
|
2020-01-25 22:01:16 +00:00
|
|
|
= help: calling `.get()` is both faster and more readable
|
2019-04-11 05:58:50 +00:00
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
error: called `.iter().nth()` on a `VecDeque`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth.rs:37:29
|
2019-04-11 05:58:50 +00:00
|
|
|
|
|
|
|
|
LL | let bad_vec_deque = some_vec_deque.iter().nth(3);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-24 08:04:46 +00:00
|
|
|
|
|
2020-01-25 22:01:16 +00:00
|
|
|
= help: calling `.get()` is both faster and more readable
|
2019-04-11 05:58:50 +00:00
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
error: called `.iter_mut().nth()` on a `Vec`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth.rs:42:23
|
2019-04-11 05:58:50 +00:00
|
|
|
|
|
|
|
|
LL | let bad_vec = some_vec.iter_mut().nth(3);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-24 08:04:46 +00:00
|
|
|
|
|
2020-01-25 22:01:16 +00:00
|
|
|
= help: calling `.get_mut()` is both faster and more readable
|
2019-04-11 05:58:50 +00:00
|
|
|
|
2020-01-24 08:04:46 +00:00
|
|
|
error: called `.iter_mut().nth()` on a slice
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth.rs:45:26
|
2019-04-11 05:58:50 +00:00
|
|
|
|
|
|
|
|
LL | let bad_slice = &some_vec[..].iter_mut().nth(3);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-24 08:04:46 +00:00
|
|
|
|
|
2020-01-25 22:01:16 +00:00
|
|
|
= help: calling `.get_mut()` is both faster and more readable
|
2019-04-11 05:58:50 +00:00
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
error: called `.iter_mut().nth()` on a `VecDeque`
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth.rs:48:29
|
2019-04-11 05:58:50 +00:00
|
|
|
|
|
|
|
|
LL | let bad_vec_deque = some_vec_deque.iter_mut().nth(3);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2020-01-24 08:04:46 +00:00
|
|
|
|
|
2020-01-25 22:01:16 +00:00
|
|
|
= help: calling `.get_mut()` is both faster and more readable
|
2019-04-11 05:58:50 +00:00
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|