Skip to content

Commit

Permalink
Auto merge of rust-lang#5127 - Areredify:issue-5115, r=flip1995
Browse files Browse the repository at this point in the history
improve 'iter_nth_zero' documentation

closes rust-lang#5115

changelog: Improve the documentation of `iter_nth_zero`
  • Loading branch information
bors committed Feb 3, 2020
2 parents 6184710 + 66ad544 commit fdc6690
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,9 @@ declare_clippy_lint! {
declare_clippy_lint! {
/// **What it does:** Checks for the use of `iter.nth(0)`.
///
/// **Why is this bad?** `iter.nth(0)` is unnecessary, and `iter.next()`
/// is more readable.
/// **Why is this bad?** `iter.next()` is equivalent to
/// `iter.nth(0)`, as they both consume the next element,
/// but is more readable.
///
/// **Known problems:** None.
///
Expand Down

0 comments on commit fdc6690

Please sign in to comment.