Skip to content

Commit 9a468ed

Browse files
committed
Rollup merge of rust-lang#29731 - steveklabnik:smallfix, r=alexcrichton
* wrap to 80 cols * small grammar fix, missing 'the'
2 parents 345fd17 + abb9c90 commit 9a468ed

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/libcore/iter.rs

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

0 commit comments

Comments
 (0)