Skip to content

Commit

Permalink
Improve wording in the documentation of Iterator::count().
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturKovacs committed Nov 4, 2019
1 parent 6ce3e1d commit 23be25c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libcore/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ pub trait Iterator {

/// Consumes the iterator, counting the number of iterations and returning it.
///
/// This method will evaluate the iterator until its [`next`] returns
/// [`None`]. Once [`None`] is encountered, `count()` returns one less than the
/// number of times it called [`next`]. Note that [`next`] has to be called at
/// least once even if the iterator does not have any elements.
/// This method will call [`next`] repeatedly until [`None`] is encountered,
/// returning the number of times it saw [`Some`]. Note that [`next`] has to be
/// called at least once even if the iterator does not have any elements.
///
/// [`next`]: #tymethod.next
/// [`None`]: ../../std/option/enum.Option.html#variant.None
/// [`Some`]: ../../std/option/enum.Option.html#variant.Some
///
/// # Overflow Behavior
///
Expand Down

0 comments on commit 23be25c

Please sign in to comment.