2020-07-26 19:07:07 +00:00
|
|
|
error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth_zero.rs:18:14
|
2019-12-28 22:37:23 +00:00
|
|
|
|
|
|
|
|
LL | let _x = s.iter().nth(0);
|
2020-07-26 19:07:07 +00:00
|
|
|
| ^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `s.iter().next()`
|
2019-12-28 22:37:23 +00:00
|
|
|
|
|
|
|
|
= note: `-D clippy::iter-nth-zero` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::iter_nth_zero)]`
|
2019-12-28 22:37:23 +00:00
|
|
|
|
2020-07-26 19:07:07 +00:00
|
|
|
error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth_zero.rs:23:14
|
2019-12-28 22:37:23 +00:00
|
|
|
|
|
|
|
|
LL | let _y = iter.nth(0);
|
2020-07-26 19:07:07 +00:00
|
|
|
| ^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `iter.next()`
|
2019-12-28 22:37:23 +00:00
|
|
|
|
2020-07-26 19:07:07 +00:00
|
|
|
error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
|
2024-02-17 12:16:29 +00:00
|
|
|
--> tests/ui/iter_nth_zero.rs:28:22
|
2019-12-28 22:37:23 +00:00
|
|
|
|
|
|
|
|
LL | let _unwrapped = iter2.nth(0).unwrap();
|
2020-07-26 19:07:07 +00:00
|
|
|
| ^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `iter2.next()`
|
2019-12-28 22:37:23 +00:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|