iterator.rs: remove "Basic usage" text
Only one example is given (for each method)
This commit is contained in:
parent
bdc15928c8
commit
142ab9e882
@ -89,8 +89,6 @@ pub trait Iterator {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
///
|
||||
@ -249,8 +247,6 @@ fn size_hint(&self) -> (usize, Option<usize>) {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
/// assert_eq!(a.iter().count(), 3);
|
||||
@ -280,8 +276,6 @@ fn count(self) -> usize
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
/// assert_eq!(a.iter().last(), Some(&3));
|
||||
@ -324,8 +318,6 @@ fn some<T>(_: Option<T>, x: T) -> Option<T> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(iter_advance_by)]
|
||||
///
|
||||
@ -432,8 +424,6 @@ fn nth(&mut self, n: usize) -> Option<Self::Item> {
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [0, 1, 2, 3, 4, 5];
|
||||
/// let mut iter = a.iter().step_by(2);
|
||||
@ -1342,8 +1332,6 @@ fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
///
|
||||
@ -1434,8 +1422,6 @@ fn take(self, n: usize) -> Take<Self>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3, 4];
|
||||
///
|
||||
@ -1486,8 +1472,6 @@ fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let words = ["alpha", "beta", "gamma"];
|
||||
///
|
||||
@ -1765,8 +1749,6 @@ fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// // an iterator which alternates between Some and None
|
||||
/// struct Alternate {
|
||||
@ -1911,8 +1893,6 @@ fn inspect<F>(self, f: F) -> Inspect<Self, F>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let mut words = ["hello", "world", "of", "Rust"].into_iter();
|
||||
///
|
||||
@ -2221,8 +2201,6 @@ fn collect_into<E: Extend<Self::Item>>(self, collection: &mut E) -> &mut E
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
///
|
||||
@ -3193,8 +3171,6 @@ fn check<T>(
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
/// let b: Vec<u32> = Vec::new();
|
||||
@ -3232,8 +3208,6 @@ fn max(self) -> Option<Self::Item>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
/// let b: Vec<u32> = Vec::new();
|
||||
@ -3420,8 +3394,6 @@ fn rev(self) -> Rev<Self>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [(1, 2), (3, 4), (5, 6)];
|
||||
///
|
||||
@ -3458,8 +3430,6 @@ fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
///
|
||||
@ -3538,8 +3508,6 @@ fn cloned<'a, T: 'a>(self) -> Cloned<Self>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
///
|
||||
@ -3624,8 +3592,6 @@ fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// let a = [1, 2, 3];
|
||||
/// let sum: i32 = a.iter().sum();
|
||||
@ -3703,8 +3669,6 @@ fn cmp<I>(self, other: I) -> Ordering
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(iter_order_by)]
|
||||
///
|
||||
@ -3790,8 +3754,6 @@ fn partial_cmp<I>(self, other: I) -> Option<Ordering>
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(iter_order_by)]
|
||||
///
|
||||
@ -3863,8 +3825,6 @@ fn eq<I>(self, other: I) -> bool
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// Basic usage:
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(iter_order_by)]
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user