Skip to content

Commit 23be25c

Browse files
committed
Improve wording in the documentation of Iterator::count().
1 parent 6ce3e1d commit 23be25c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/iter/traits/iterator.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ pub trait Iterator {
201201

202202
/// Consumes the iterator, counting the number of iterations and returning it.
203203
///
204-
/// This method will evaluate the iterator until its [`next`] returns
205-
/// [`None`]. Once [`None`] is encountered, `count()` returns one less than the
206-
/// number of times it called [`next`]. Note that [`next`] has to be called at
207-
/// least once even if the iterator does not have any elements.
204+
/// This method will call [`next`] repeatedly until [`None`] is encountered,
205+
/// returning the number of times it saw [`Some`]. Note that [`next`] has to be
206+
/// called at least once even if the iterator does not have any elements.
208207
///
209208
/// [`next`]: #tymethod.next
210209
/// [`None`]: ../../std/option/enum.Option.html#variant.None
210+
/// [`Some`]: ../../std/option/enum.Option.html#variant.Some
211211
///
212212
/// # Overflow Behavior
213213
///

0 commit comments

Comments
 (0)