Skip to content

Commit abb9c90

Browse files
committed
Some cleanup on after #29684
* wrap to 80 cols * small grammar fix, missing 'the'
1 parent 2968dfa commit abb9c90

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/libcore/iter.rs

+13-14
Original file line numberDiff line numberDiff line change
@@ -371,22 +371,21 @@ pub trait Iterator {
371371
///
372372
/// # Implementation notes
373373
///
374-
/// It is not enforced that an iterator implementation yields the
375-
/// declared number of elements. A buggy iterator may yield less
376-
/// than the lower bound or more than the upper bound of elements.
374+
/// It is not enforced that an iterator implementation yields the declared
375+
/// number of elements. A buggy iterator may yield less than the lower bound
376+
/// or more than the upper bound of elements.
377377
///
378-
/// `size_hint()` is primarily intended to be used for optimizations
379-
/// such as reserving space for the elements of the iterator, but
380-
/// must not be trusted to e.g. omit bounds checks in unsafe code.
381-
/// An incorrect implementation of `size_hint()` should not lead to
382-
/// memory safety violations.
378+
/// `size_hint()` is primarily intended to be used for optimizations such as
379+
/// reserving space for the elements of the iterator, but must not be
380+
/// trusted to e.g. omit bounds checks in unsafe code. An incorrect
381+
/// implementation of `size_hint()` should not lead to memory safety
382+
/// violations.
383383
///
384-
/// That said, the implementation should provide a correct
385-
/// estimation, because otherwise it would be a violation of the
386-
/// trait's protocol.
384+
/// That said, the implementation should provide a correct estimation,
385+
/// because otherwise it would be a violation of the trait's protocol.
387386
///
388-
/// The default implementation returns `(0, None)` which is correct
389-
/// for any iterator.
387+
/// The default implementation returns `(0, None)` which is correct for any
388+
/// iterator.
390389
///
391390
/// # Examples
392391
///
@@ -2750,7 +2749,7 @@ pub trait ExactSizeIterator: Iterator {
27502749
/// implementation, you can do so. See the [trait-level] docs for an
27512750
/// example.
27522751
///
2753-
/// This function has the same safety guarantees as [`size_hint()`]
2752+
/// This function has the same safety guarantees as the [`size_hint()`]
27542753
/// function.
27552754
///
27562755
/// [trait-level]: trait.ExactSizeIterator.html

0 commit comments

Comments
 (0)