mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
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:
commit
fdc6690a2e
1 changed files with 3 additions and 2 deletions
|
@ -798,8 +798,9 @@ declare_clippy_lint! {
|
||||||
declare_clippy_lint! {
|
declare_clippy_lint! {
|
||||||
/// **What it does:** Checks for the use of `iter.nth(0)`.
|
/// **What it does:** Checks for the use of `iter.nth(0)`.
|
||||||
///
|
///
|
||||||
/// **Why is this bad?** `iter.nth(0)` is unnecessary, and `iter.next()`
|
/// **Why is this bad?** `iter.next()` is equivalent to
|
||||||
/// is more readable.
|
/// `iter.nth(0)`, as they both consume the next element,
|
||||||
|
/// but is more readable.
|
||||||
///
|
///
|
||||||
/// **Known problems:** None.
|
/// **Known problems:** None.
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in a new issue