mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 03:33:59 +00:00
doc: bindings not needed for this example
This commit is contained in:
parent
b8b18aac12
commit
4289973a2d
@ -2756,20 +2756,11 @@ pub trait Extend<A> {
|
|||||||
///
|
///
|
||||||
/// let mut iter = numbers.iter();
|
/// let mut iter = numbers.iter();
|
||||||
///
|
///
|
||||||
/// let n = iter.next();
|
/// assert_eq!(Some(&1), iter.next());
|
||||||
/// assert_eq!(Some(&1), n);
|
/// assert_eq!(Some(&3), iter.next_back());
|
||||||
///
|
/// assert_eq!(Some(&2), iter.next_back());
|
||||||
/// let n = iter.next_back();
|
/// assert_eq!(None, iter.next());
|
||||||
/// assert_eq!(Some(&3), n);
|
/// assert_eq!(None, iter.next_back());
|
||||||
///
|
|
||||||
/// let n = iter.next_back();
|
|
||||||
/// assert_eq!(Some(&2), n);
|
|
||||||
///
|
|
||||||
/// let n = iter.next();
|
|
||||||
/// assert_eq!(None, n);
|
|
||||||
///
|
|
||||||
/// let n = iter.next_back();
|
|
||||||
/// assert_eq!(None, n);
|
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
pub trait DoubleEndedIterator: Iterator {
|
pub trait DoubleEndedIterator: Iterator {
|
||||||
@ -2789,20 +2780,11 @@ pub trait DoubleEndedIterator: Iterator {
|
|||||||
///
|
///
|
||||||
/// let mut iter = numbers.iter();
|
/// let mut iter = numbers.iter();
|
||||||
///
|
///
|
||||||
/// let n = iter.next();
|
/// assert_eq!(Some(&1), iter.next());
|
||||||
/// assert_eq!(Some(&1), n);
|
/// assert_eq!(Some(&3), iter.next_back());
|
||||||
///
|
/// assert_eq!(Some(&2), iter.next_back());
|
||||||
/// let n = iter.next_back();
|
/// assert_eq!(None, iter.next());
|
||||||
/// assert_eq!(Some(&3), n);
|
/// assert_eq!(None, iter.next_back());
|
||||||
///
|
|
||||||
/// let n = iter.next_back();
|
|
||||||
/// assert_eq!(Some(&2), n);
|
|
||||||
///
|
|
||||||
/// let n = iter.next();
|
|
||||||
/// assert_eq!(None, n);
|
|
||||||
///
|
|
||||||
/// let n = iter.next_back();
|
|
||||||
/// assert_eq!(None, n);
|
|
||||||
/// ```
|
/// ```
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
fn next_back(&mut self) -> Option<Self::Item>;
|
fn next_back(&mut self) -> Option<Self::Item>;
|
||||||
|
Loading…
Reference in New Issue
Block a user