Skip to content

Commit 2d0e4ed

Browse files
committed
Describe next_back() wrt Iterator protocol
Fixes #30633
1 parent 0486e12 commit 2d0e4ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/libcore/iter.rs

+6
Original file line numberDiff line numberDiff line change
@@ -2740,7 +2740,13 @@ pub trait Extend<A> {
27402740
/// It is important to note that both back and forth work on the same range,
27412741
/// and do not cross: iteration is over when they meet in the middle.
27422742
///
2743+
/// In a similar fashion to the [`Iterator`] protocol, once a
2744+
/// `DoubleEndedIterator` returns `None` from a `next_back()`, calling it again
2745+
/// may or may not ever return `Some` again. `next()` and `next_back()` are
2746+
/// interchangable for this purpose.
2747+
///
27432748
/// [`Iterator`]: trait.Iterator.html
2749+
///
27442750
/// # Examples
27452751
///
27462752
/// Basic usage:

0 commit comments

Comments
 (0)