Skip to content

Commit 0366c2d

Browse files
committed
Simplify link paths
1 parent 9933ea1 commit 0366c2d

File tree

10 files changed

+26
-31
lines changed

10 files changed

+26
-31
lines changed

src/combinations.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ impl<I: Iterator> Combinations<I> {
4747
pub fn k(&self) -> usize { self.indices.len() }
4848

4949
/// Returns the (current) length of the pool from which combination elements are
50-
/// selected. This value can change between invocations of [`next`].
51-
///
52-
/// [`next`]: #method.next
50+
/// selected. This value can change between invocations of [`next`](Combinations::next).
5351
#[inline]
5452
pub fn n(&self) -> usize { self.pool.len() }
5553

src/duplicates_impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ mod private {
176176

177177
/// An iterator adapter to filter for duplicate elements.
178178
///
179-
/// See [`.duplicates_by()`](../trait.Itertools.html#method.duplicates_by) for more information.
179+
/// See [`.duplicates_by()`](crate::Itertools::duplicates_by) for more information.
180180
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
181181
pub type DuplicatesBy<I, V, F> = private::DuplicatesBy<I, V, private::ByFn<F>>;
182182

@@ -192,7 +192,7 @@ where
192192

193193
/// An iterator adapter to filter out duplicate elements.
194194
///
195-
/// See [`.duplicates()`](../trait.Itertools.html#method.duplicates) for more information.
195+
/// See [`.duplicates()`](crate::Itertools::duplicates) for more information.
196196
pub type Duplicates<I> = private::DuplicatesBy<I, <I as Iterator>::Item, private::ById>;
197197

198198
/// Create a new `Duplicates` iterator.

src/either_or_both.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ impl<A, B> EitherOrBoth<A, B> {
2525
}
2626

2727
/// If Left, return true otherwise, return false.
28-
/// Exclusive version of [`has_left`](Self::has_left).
28+
/// Exclusive version of [`has_left`](EitherOrBoth::has_left).
2929
pub fn is_left(&self) -> bool {
3030
match *self {
3131
Left(_) => true,
@@ -34,7 +34,7 @@ impl<A, B> EitherOrBoth<A, B> {
3434
}
3535

3636
/// If Right, return true otherwise, return false.
37-
/// Exclusive version of [`has_right`](Self::has_right).
37+
/// Exclusive version of [`has_right`](EitherOrBoth::has_right).
3838
pub fn is_right(&self) -> bool {
3939
match *self {
4040
Right(_) => true,

src/free.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +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].
227-
///
228-
/// [1]: crate::Itertools::sorted
226+
/// [`IntoIterator`] enabled version of [`Itertools::sorted`].
229227
///
230228
/// ```
231229
/// use itertools::sorted;

src/grouping_map.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use std::hash::Hash;
77
use std::iter::Iterator;
88
use std::ops::{Add, Mul};
99

10-
/// A wrapper to allow for an easy [`into_grouping_map_by`](../trait.Itertools.html#method.into_grouping_map_by)
10+
/// A wrapper to allow for an easy [`into_grouping_map_by`](crate::Itertools::into_grouping_map_by)
1111
#[derive(Clone, Debug)]
1212
pub struct MapForGrouping<I, F>(I, F);
1313

@@ -38,7 +38,7 @@ pub fn new<I, K, V>(iter: I) -> GroupingMap<I>
3838

3939
/// `GroupingMapBy` is an intermediate struct for efficient group-and-fold operations.
4040
///
41-
/// See [`GroupingMap`](./struct.GroupingMap.html) for more informations.
41+
/// See [`GroupingMap`] for more informations.
4242
#[must_use = "GroupingMapBy is lazy and do nothing unless consumed"]
4343
pub type GroupingMapBy<I, F> = GroupingMap<MapForGrouping<I, F>>;
4444

@@ -377,7 +377,7 @@ impl<I, K, V> GroupingMap<I>
377377
/// If several elements are equally maximum, the last element is picked.
378378
/// If several elements are equally minimum, the first element is picked.
379379
///
380-
/// See [.minmax()](../trait.Itertools.html#method.minmax) for the non-grouping version.
380+
/// See [.minmax()](crate::Itertools::minmax) for the non-grouping version.
381381
///
382382
/// Differences from the non grouping version:
383383
/// - It never produces a `MinMaxResult::NoElements`

src/lib.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,11 @@ macro_rules! chain {
421421
///
422422
/// * *Adaptors* take an iterator and parameter as input, and return
423423
/// a new iterator value. These are listed first in the trait. An example
424-
/// of an adaptor is [`.interleave()`](#method.interleave)
424+
/// of an adaptor is [`.interleave()`](Itertools::interleave)
425425
///
426426
/// * *Regular methods* are those that don't return iterators and instead
427427
/// return a regular value of some other kind.
428-
/// [`.next_tuple()`](#method.next_tuple) is an example and the first regular
428+
/// [`.next_tuple()`](Itertools::next_tuple) is an example and the first regular
429429
/// method in the list.
430430
pub trait Itertools : Iterator {
431431
// adaptors
@@ -740,7 +740,7 @@ pub trait Itertools : Iterator {
740740
/// Return an iterator that groups the items in tuples of a specific size
741741
/// (up to 4).
742742
///
743-
/// See also the method [`.next_tuple()`](#method.next_tuple).
743+
/// See also the method [`.next_tuple()`](Itertools::next_tuple).
744744
///
745745
/// ```
746746
/// use itertools::Itertools;
@@ -838,7 +838,7 @@ pub trait Itertools : Iterator {
838838
adaptors::map_into(self)
839839
}
840840

841-
/// See [`.map_ok()`](#method.map_ok).
841+
/// See [`.map_ok()`](Itertools::map_ok).
842842
#[deprecated(note="Use .map_ok() instead", since="0.10.0")]
843843
fn map_results<F, T, U, E>(self, f: F) -> MapOk<Self, F>
844844
where Self: Iterator<Item = Result<T, E>> + Sized,
@@ -1354,7 +1354,7 @@ pub trait Itertools : Iterator {
13541354
/// `peeking_take_while` is done.
13551355
///
13561356
///
1357-
/// See also [`.take_while_ref()`](#method.take_while_ref)
1357+
/// See also [`.take_while_ref()`](Itertools::take_while_ref)
13581358
/// which is a similar adaptor.
13591359
fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<Self, F>
13601360
where Self: Sized + PeekingNext,
@@ -2094,7 +2094,7 @@ pub trait Itertools : Iterator {
20942094
format::new_format(self, sep, format)
20952095
}
20962096

2097-
/// See [`.fold_ok()`](#method.fold_ok).
2097+
/// See [`.fold_ok()`](Itertools::fold_ok).
20982098
#[deprecated(note="Use .fold_ok() instead", since="0.10.0")]
20992099
fn fold_results<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
21002100
where Self: Iterator<Item = Result<A, E>>,
@@ -2794,7 +2794,7 @@ pub trait Itertools : Iterator {
27942794
/// value of type `K` will be used as key to identify the groups and the
27952795
/// value of type `V` as value for the folding operation.
27962796
///
2797-
/// See [`GroupingMap`](./structs/struct.GroupingMap.html) for more informations
2797+
/// See [`GroupingMap`] for more informations
27982798
/// on what operations are available.
27992799
#[cfg(feature = "use_std")]
28002800
fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
@@ -2810,7 +2810,7 @@ pub trait Itertools : Iterator {
28102810
/// The values from this iterator will be used as values for the folding operation
28112811
/// while the keys will be obtained from the values by calling `key_mapper`.
28122812
///
2813-
/// See [`GroupingMap`](./structs/struct.GroupingMap.html) for more informations
2813+
/// See [`GroupingMap`] for more informations
28142814
/// on what operations are available.
28152815
#[cfg(feature = "use_std")]
28162816
fn into_grouping_map_by<K, V, F>(self, key_mapper: F) -> GroupingMapBy<Self, F>
@@ -3471,9 +3471,9 @@ pub fn partition<'a, A: 'a, I, F>(iter: I, mut pred: F) -> usize
34713471
split_index
34723472
}
34733473

3474-
/// An enum used for controlling the execution of `.fold_while()`.
3474+
/// An enum used for controlling the execution of `fold_while`.
34753475
///
3476-
/// See [`.fold_while()`](crate::Itertools::fold_while) for more information.
3476+
/// See [`.fold_while()`](Itertools::fold_while) for more information.
34773477
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
34783478
pub enum FoldWhile<T> {
34793479
/// Continue folding with this value

src/powerset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use super::size_hint;
77

88
/// An iterator to iterate through the powerset of the elements from an iterator.
99
///
10-
/// See [`.powerset()`](../trait.Itertools.html#method.powerset) for more
10+
/// See [`.powerset()`](crate::Itertools::powerset) for more
1111
/// information.
1212
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
1313
pub struct Powerset<I: Iterator> {

src/process_results_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/// An iterator that produces only the `T` values as long as the
33
/// inner iterator produces `Ok(T)`.
44
///
5-
/// Used by [`process_results`](../fn.process_results.html), see its docs
5+
/// Used by [`process_results`](crate::process_results), see its docs
66
/// for more information.
77
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
88
#[derive(Debug)]

src/repeatn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
/// An iterator that produces *n* repetitions of an element.
33
///
4-
/// See [`repeat_n()`](../fn.repeat_n.html) for more information.
4+
/// See [`repeat_n()`](crate::repeat_n) for more information.
55
#[must_use = "iterators are lazy and do nothing unless consumed"]
66
#[derive(Clone, Debug)]
77
pub struct RepeatN<A> {

src/sources.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use std::fmt;
66
use std::mem;
77

8-
/// See [`repeat_call`](../fn.repeat_call.html) for more information.
8+
/// See [`repeat_call`](crate::repeat_call) for more information.
99
#[derive(Clone)]
1010
#[deprecated(note="Use std repeat_with() instead", since="0.8.0")]
1111
pub struct RepeatCall<F> {
@@ -112,7 +112,7 @@ impl<St, F> fmt::Debug for Unfold<St, F>
112112
debug_fmt_fields!(Unfold, state);
113113
}
114114

115-
/// See [`unfold`](../fn.unfold.html) for more information.
115+
/// See [`unfold`](crate::unfold) for more information.
116116
#[derive(Clone)]
117117
#[must_use = "iterators are lazy and do nothing unless consumed"]
118118
pub struct Unfold<St, F> {
@@ -134,9 +134,8 @@ impl<A, St, F> Iterator for Unfold<St, F>
134134

135135
/// An iterator that infinitely applies function to value and yields results.
136136
///
137-
/// This `struct` is created by the [`iterate()`] function. See its documentation for more.
138-
///
139-
/// [`iterate()`]: ../fn.iterate.html
137+
/// This `struct` is created by the [`iterate()`](crate::iterate) function.
138+
/// See its documentation for more.
140139
#[derive(Clone)]
141140
#[must_use = "iterators are lazy and do nothing unless consumed"]
142141
pub struct Iterate<St, F> {

0 commit comments

Comments
 (0)