Skip to content

Commit 66ad544

Browse files
committed
improve 'iter_nth_zero' documentation
1 parent 6184710 commit 66ad544

File tree

1 file changed

+3
-2
lines changed
  • clippy_lints/src/methods

1 file changed

+3
-2
lines changed

clippy_lints/src/methods/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -798,8 +798,9 @@ declare_clippy_lint! {
798798
declare_clippy_lint! {
799799
/// **What it does:** Checks for the use of `iter.nth(0)`.
800800
///
801-
/// **Why is this bad?** `iter.nth(0)` is unnecessary, and `iter.next()`
802-
/// is more readable.
801+
/// **Why is this bad?** `iter.next()` is equivalent to
802+
/// `iter.nth(0)`, as they both consume the next element,
803+
/// but is more readable.
803804
///
804805
/// **Known problems:** None.
805806
///

0 commit comments

Comments
 (0)