Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add some intra-doc links to Iterator #76338

Merged
merged 1 commit into from
Sep 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ pub trait Iterator {
Enumerate::new(self)
}

/// Creates an iterator which can use `peek` to look at the next element of
/// Creates an iterator which can use [`peek`] to look at the next element of
/// the iterator without consuming it.
///
/// Adds a [`peek`] method to an iterator. See its documentation for
Expand Down Expand Up @@ -2002,7 +2002,7 @@ pub trait Iterator {

/// The same as [`fold()`], but uses the first element in the
/// iterator as the initial value, folding every subsequent element into it.
/// If the iterator is empty, return `None`; otherwise, return the result
/// If the iterator is empty, return [`None`]; otherwise, return the result
/// of the fold.
///
/// [`fold()`]: Iterator::fold
Expand Down Expand Up @@ -2831,7 +2831,7 @@ pub trait Iterator {
Product::product(self)
}

/// Lexicographically compares the elements of this `Iterator` with those
/// Lexicographically compares the elements of this [`Iterator`] with those
/// of another.
///
/// # Examples
Expand All @@ -2853,7 +2853,7 @@ pub trait Iterator {
self.cmp_by(other, |x, y| x.cmp(&y))
}

/// Lexicographically compares the elements of this `Iterator` with those
/// Lexicographically compares the elements of this [`Iterator`] with those
/// of another with respect to the specified comparison function.
///
/// # Examples
Expand Down Expand Up @@ -2905,7 +2905,7 @@ pub trait Iterator {
}
}

/// Lexicographically compares the elements of this `Iterator` with those
/// Lexicographically compares the elements of this [`Iterator`] with those
/// of another.
///
/// # Examples
Expand All @@ -2929,7 +2929,7 @@ pub trait Iterator {
self.partial_cmp_by(other, |x, y| x.partial_cmp(&y))
}

/// Lexicographically compares the elements of this `Iterator` with those
/// Lexicographically compares the elements of this [`Iterator`] with those
/// of another with respect to the specified comparison function.
///
/// # Examples
Expand Down Expand Up @@ -2990,7 +2990,7 @@ pub trait Iterator {
}
}

/// Determines if the elements of this `Iterator` are equal to those of
/// Determines if the elements of this [`Iterator`] are equal to those of
/// another.
///
/// # Examples
Expand All @@ -3009,7 +3009,7 @@ pub trait Iterator {
self.eq_by(other, |x, y| x == y)
}

/// Determines if the elements of this `Iterator` are equal to those of
/// Determines if the elements of this [`Iterator`] are equal to those of
/// another with respect to the specified equality function.
///
/// # Examples
Expand Down Expand Up @@ -3050,7 +3050,7 @@ pub trait Iterator {
}
}

/// Determines if the elements of this `Iterator` are unequal to those of
/// Determines if the elements of this [`Iterator`] are unequal to those of
/// another.
///
/// # Examples
Expand All @@ -3069,7 +3069,7 @@ pub trait Iterator {
!self.eq(other)
}

/// Determines if the elements of this `Iterator` are lexicographically
/// Determines if the elements of this [`Iterator`] are lexicographically
/// less than those of another.
///
/// # Examples
Expand All @@ -3090,7 +3090,7 @@ pub trait Iterator {
self.partial_cmp(other) == Some(Ordering::Less)
}

/// Determines if the elements of this `Iterator` are lexicographically
/// Determines if the elements of this [`Iterator`] are lexicographically
/// less or equal to those of another.
///
/// # Examples
Expand All @@ -3111,7 +3111,7 @@ pub trait Iterator {
matches!(self.partial_cmp(other), Some(Ordering::Less | Ordering::Equal))
}

/// Determines if the elements of this `Iterator` are lexicographically
/// Determines if the elements of this [`Iterator`] are lexicographically
/// greater than those of another.
///
/// # Examples
Expand All @@ -3132,7 +3132,7 @@ pub trait Iterator {
self.partial_cmp(other) == Some(Ordering::Greater)
}

/// Determines if the elements of this `Iterator` are lexicographically
/// Determines if the elements of this [`Iterator`] are lexicographically
/// greater than or equal to those of another.
///
/// # Examples
Expand Down