Skip to content

Commit 08036af

Browse files
committed
Link to common traits, structs, etc.
1 parent b87fc76 commit 08036af

File tree

10 files changed

+29
-29
lines changed

10 files changed

+29
-29
lines changed

src/adaptors/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub struct Interleave<I, J> {
3535

3636
/// Create an iterator that interleaves elements in `i` and `j`.
3737
///
38-
/// `IntoIterator` enabled version of `i.interleave(j)`.
38+
/// [`IntoIterator`] enabled version of `i.interleave(j)`.
3939
///
4040
/// See [`.interleave()`](crate::Itertools::interleave) for more information.
4141
pub fn interleave<I, J>(i: I, j: J) -> Interleave<<I as IntoIterator>::IntoIter, <J as IntoIterator>::IntoIter>
@@ -481,7 +481,7 @@ pub type Merge<I, J> = MergeBy<I, J, MergeLte>;
481481

482482
/// Create an iterator that merges elements in `i` and `j`.
483483
///
484-
/// `IntoIterator` enabled version of `i.merge(j)`.
484+
/// [`IntoIterator`] enabled version of `i.merge(j)`.
485485
///
486486
/// ```
487487
/// use itertools::merge;

src/concat_impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::Itertools;
22

3-
/// Combine all an iterator's elements into one element by using `Extend`.
3+
/// Combine all an iterator's elements into one element by using [`Extend`].
44
///
5-
/// `IntoIterator`-enabled version of `.concat()`
5+
/// [`IntoIterator`]-enabled version of `.concat()`
66
///
77
/// This combinator will extend the first item with each of the rest of the
88
/// items of the iterator. If the iterator is empty, the default value of

src/diff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub enum Diff<I, J>
2626
}
2727

2828
/// Compares every element yielded by both `i` and `j` with the given function in lock-step and
29-
/// returns a `Diff` which describes how `j` differs from `i`.
29+
/// returns a [`Diff`] which describes how `j` differs from `i`.
3030
///
3131
/// If the number of elements yielded by `j` is less than the number of elements yielded by `i`,
3232
/// the number of `j` elements yielded will be returned along with `i`'s remaining elements as

src/free.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Free functions that create iterator adaptors or call iterator methods.
22
//!
3-
//! The benefit of free functions is that they accept any `IntoIterator` as
3+
//! The benefit of free functions is that they accept any [`IntoIterator`] as
44
//! argument, so the resulting code may be easier to read.
55
66
#[cfg(feature = "use_alloc")]
@@ -37,7 +37,7 @@ pub use crate::rciter_impl::rciter;
3737

3838
/// Iterate `iterable` with a running index.
3939
///
40-
/// `IntoIterator` enabled version of `.enumerate()`.
40+
/// [`IntoIterator`] enabled version of `.enumerate()`.
4141
///
4242
/// ```
4343
/// use itertools::enumerate;
@@ -54,7 +54,7 @@ pub fn enumerate<I>(iterable: I) -> iter::Enumerate<I::IntoIter>
5454

5555
/// Iterate `iterable` in reverse.
5656
///
57-
/// `IntoIterator` enabled version of `.rev()`.
57+
/// [`IntoIterator`] enabled version of `.rev()`.
5858
///
5959
/// ```
6060
/// use itertools::rev;
@@ -72,7 +72,7 @@ pub fn rev<I>(iterable: I) -> iter::Rev<I::IntoIter>
7272

7373
/// Iterate `i` and `j` in lock step.
7474
///
75-
/// `IntoIterator` enabled version of `i.zip(j)`.
75+
/// [`IntoIterator`] enabled version of `i.zip(j)`.
7676
///
7777
/// ```
7878
/// use itertools::zip;
@@ -109,7 +109,7 @@ pub fn chain<I, J>(i: I, j: J) -> iter::Chain<<I as IntoIterator>::IntoIter, <J
109109

110110
/// Create an iterator that clones each element from &T to T
111111
///
112-
/// `IntoIterator` enabled version of `i.cloned()`.
112+
/// [`IntoIterator`] enabled version of `i.cloned()`.
113113
///
114114
/// ```
115115
/// use itertools::cloned;
@@ -125,7 +125,7 @@ pub fn cloned<'a, I, T: 'a>(iterable: I) -> iter::Cloned<I::IntoIter>
125125

126126
/// Perform a fold operation over the iterable.
127127
///
128-
/// `IntoIterator` enabled version of `i.fold(init, f)`
128+
/// [`IntoIterator`] enabled version of `i.fold(init, f)`
129129
///
130130
/// ```
131131
/// use itertools::fold;
@@ -141,7 +141,7 @@ pub fn fold<I, B, F>(iterable: I, init: B, f: F) -> B
141141

142142
/// Test whether the predicate holds for all elements in the iterable.
143143
///
144-
/// `IntoIterator` enabled version of `i.all(f)`
144+
/// [`IntoIterator`] enabled version of `i.all(f)`
145145
///
146146
/// ```
147147
/// use itertools::all;
@@ -157,7 +157,7 @@ pub fn all<I, F>(iterable: I, f: F) -> bool
157157

158158
/// Test whether the predicate holds for any elements in the iterable.
159159
///
160-
/// `IntoIterator` enabled version of `i.any(f)`
160+
/// [`IntoIterator`] enabled version of `i.any(f)`
161161
///
162162
/// ```
163163
/// use itertools::any;
@@ -173,7 +173,7 @@ pub fn any<I, F>(iterable: I, f: F) -> bool
173173

174174
/// Return the maximum value of the iterable.
175175
///
176-
/// `IntoIterator` enabled version of `i.max()`.
176+
/// [`IntoIterator`] enabled version of `i.max()`.
177177
///
178178
/// ```
179179
/// use itertools::max;
@@ -189,7 +189,7 @@ pub fn max<I>(iterable: I) -> Option<I::Item>
189189

190190
/// Return the minimum value of the iterable.
191191
///
192-
/// `IntoIterator` enabled version of `i.min()`.
192+
/// [`IntoIterator`] enabled version of `i.min()`.
193193
///
194194
/// ```
195195
/// use itertools::min;
@@ -206,7 +206,7 @@ pub fn min<I>(iterable: I) -> Option<I::Item>
206206

207207
/// Combine all iterator elements into one String, seperated by `sep`.
208208
///
209-
/// `IntoIterator` enabled version of `iterable.join(sep)`.
209+
/// [`IntoIterator`] enabled version of `iterable.join(sep)`.
210210
///
211211
/// ```
212212
/// use itertools::join;
@@ -223,7 +223,7 @@ pub fn join<I>(iterable: I, sep: &str) -> String
223223

224224
/// Sort all iterator elements into a new iterator in ascending order.
225225
///
226-
/// `IntoIterator` enabled version of [`iterable.sorted()`][1].
226+
/// [`IntoIterator`] enabled version of [`iterable.sorted()`][1].
227227
///
228228
/// [1]: crate::Itertools::sorted
229229
///

src/groupbylazy.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ impl<K, I, F> GroupInner<K, I, F>
279279
/// no allocations. It needs allocations only if several group iterators
280280
/// are alive at the same time.
281281
///
282-
/// This type implements `IntoIterator` (it is **not** an iterator
282+
/// This type implements [`IntoIterator`] (it is **not** an iterator
283283
/// itself), because the group iterators need to borrow from this
284284
/// value. It should be stored in a local variable or temporary and
285285
/// iterated.
@@ -453,7 +453,7 @@ pub fn new_chunks<J>(iter: J, size: usize) -> IntoChunks<J::IntoIter>
453453
/// `IntoChunks` behaves just like `GroupBy`: it is iterable, and
454454
/// it only buffers if several chunk iterators are alive at the same time.
455455
///
456-
/// This type implements `IntoIterator` (it is **not** an iterator
456+
/// This type implements [`IntoIterator`] (it is **not** an iterator
457457
/// itself), because the chunk iterators need to borrow from this
458458
/// value. It should be stored in a local variable or temporary and
459459
/// iterated.

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ pub trait Itertools : Iterator {
595595
/// allocations. It needs allocations only if several group iterators
596596
/// are alive at the same time.
597597
///
598-
/// This type implements `IntoIterator` (it is **not** an iterator
598+
/// This type implements [`IntoIterator`] (it is **not** an iterator
599599
/// itself), because the group iterators need to borrow from this
600600
/// value. It should be stored in a local variable or temporary and
601601
/// iterated.
@@ -824,7 +824,7 @@ pub trait Itertools : Iterator {
824824
adaptors::step(self, n)
825825
}
826826

827-
/// Convert each item of the iterator using the `Into` trait.
827+
/// Convert each item of the iterator using the [`Into`] trait.
828828
///
829829
/// ```rust
830830
/// use itertools::Itertools;
@@ -1915,7 +1915,7 @@ pub trait Itertools : Iterator {
19151915
self.for_each(f)
19161916
}
19171917

1918-
/// Combine all an iterator's elements into one element by using `Extend`.
1918+
/// Combine all an iterator's elements into one element by using [`Extend`].
19191919
///
19201920
/// This combinator will extend the first item with each of the rest of the
19211921
/// items of the iterator. If the iterator is empty, the default value of
@@ -2865,7 +2865,7 @@ pub trait Itertools : Iterator {
28652865
/// Return the minimum and maximum element of an iterator, as determined by
28662866
/// the specified function.
28672867
///
2868-
/// The return value is a variant of `MinMaxResult` like for `minmax()`.
2868+
/// The return value is a variant of [`MinMaxResult`] like for `minmax()`.
28692869
///
28702870
/// For the minimum, the first minimal element is returned. For the maximum,
28712871
/// the last maximal element wins. This matches the behavior of the standard
@@ -2882,7 +2882,7 @@ pub trait Itertools : Iterator {
28822882
/// Return the minimum and maximum element of an iterator, as determined by
28832883
/// the specified comparison function.
28842884
///
2885-
/// The return value is a variant of `MinMaxResult` like for `minmax()`.
2885+
/// The return value is a variant of [`MinMaxResult`] like for `minmax()`.
28862886
///
28872887
/// For the minimum, the first minimal element is returned. For the maximum,
28882888
/// the last maximal element wins. This matches the behavior of the standard
@@ -3370,7 +3370,7 @@ impl<T: ?Sized> Itertools for T where T: Iterator { }
33703370
/// (elements pairwise equal and sequences of the same length),
33713371
/// `false` otherwise.
33723372
///
3373-
/// This is an `IntoIterator` enabled function that is similar to the standard
3373+
/// This is an [`IntoIterator`] enabled function that is similar to the standard
33743374
/// library method `Iterator::eq`.
33753375
///
33763376
/// ```

src/peek_nth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ where
1313
buf: VecDeque<I::Item>,
1414
}
1515

16-
/// A drop-in replacement for `std::iter::Peekable` which adds a `peek_nth`
16+
/// A drop-in replacement for [`std::iter::Peekable`] which adds a `peek_nth`
1717
/// method allowing the user to `peek` at a value several iterations forward
1818
/// without advancing the base iterator.
1919
///

src/sources.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl<A, F> Iterator for RepeatCall<F>
6767
/// `unfold` is a general iterator builder: it has a mutable state value,
6868
/// and a closure with access to the state that produces the next value.
6969
///
70-
/// This more or less equivalent to a regular struct with an `Iterator`
70+
/// This more or less equivalent to a regular struct with an [`Iterator`]
7171
/// implementation, and is useful for one-off iterators.
7272
///
7373
/// ```

src/zip_eq_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub struct ZipEq<I, J> {
1414
///
1515
/// **Panics** if the iterators are not of the same length.
1616
///
17-
/// `IntoIterator` enabled version of `i.zip_eq(j)`.
17+
/// [`IntoIterator`] enabled version of `i.zip_eq(j)`.
1818
///
1919
/// ```
2020
/// use itertools::zip_eq;

src/ziptuple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pub struct Zip<T> {
1010
/// An iterator that generalizes *.zip()* and allows running multiple iterators in lockstep.
1111
///
1212
/// The iterator `Zip<(I, J, ..., M)>` is formed from a tuple of iterators (or values that
13-
/// implement `IntoIterator`) and yields elements
13+
/// implement [`IntoIterator`]) and yields elements
1414
/// until any of the subiterators yields `None`.
1515
///
1616
/// The iterator element type is a tuple like like `(A, B, ..., E)` where `A` to `E` are the

0 commit comments

Comments
 (0)