Auto merge of #5127 - Areredify:issue-5115, r=flip1995

improve 'iter_nth_zero' documentation

closes #5115

changelog: Improve the documentation of `iter_nth_zero`
This commit is contained in:
bors 2020-02-03 16:16:44 +00:00
commit fdc6690a2e

View file

@ -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.
///