From 721dc47a6996f0c418ed515701142d79846c8e10 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sun, 9 Aug 2015 01:04:59 +0200 Subject: [PATCH] doc/core: fix description of `nth` function The "nth" element can be confusing. In an array context, we know indexes start from 0 but one may believe this is not the case with "nth". For example, would `.nth(1)` return the first (1th/1st) or the second element? Rephrase a bit to be less confusing. --- src/libcore/iter.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libcore/iter.rs b/src/libcore/iter.rs index 2968d63454457..3382095b4560f 100644 --- a/src/libcore/iter.rs +++ b/src/libcore/iter.rs @@ -148,8 +148,7 @@ pub trait Iterator { last } - /// Loops through `n` iterations, returning the `n`th element of the - /// iterator. + /// Skips the `n` first elements of the iterator and returns the next one. /// /// # Examples ///