about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-02-03 16:16:44 +0000
committerbors <bors@rust-lang.org>2020-02-03 16:16:44 +0000
commitfdc6690a2ebbcb8527bb922d9be6c3bd1c6aae64 (patch)
tree929a366603af4fe1046f8bc8e9e839a74d677248
parent6184710d085e23c222c3c60b6bab2635032d834d (diff)
parent66ad54417519c40db4b0d19c4c7704314166f7c0 (diff)
downloadrust-fdc6690a2ebbcb8527bb922d9be6c3bd1c6aae64.tar.gz
rust-fdc6690a2ebbcb8527bb922d9be6c3bd1c6aae64.zip
Auto merge of #5127 - Areredify:issue-5115, r=flip1995
improve 'iter_nth_zero' documentation

closes #5115

changelog: Improve the documentation of `iter_nth_zero`
-rw-r--r--clippy_lints/src/methods/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs
index f9efec87c3e..82bc8740d1a 100644
--- a/clippy_lints/src/methods/mod.rs
+++ b/clippy_lints/src/methods/mod.rs
@@ -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.
     ///