Skip to content

Commit dcb6f77

Browse files
committed
Refine links in docs for the chain! macro
1 parent ba7d4e2 commit dcb6f77

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/lib.rs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,31 +354,28 @@ macro_rules! izip {
354354
/// The comma-separated arguments must implement [`IntoIterator`].
355355
/// The final argument may be followed by a trailing comma.
356356
///
357-
/// [`chain`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.chain
358-
/// [`IntoIterator`]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html
357+
/// [`chain`]: Iterator::chain
359358
///
360359
/// # Examples
361360
///
362-
/// [`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html
363-
///
364-
/// Empty invocations of `chain!` expand to an invocation of [`iter::empty`]:
361+
/// Empty invocations of `chain!` expand to an invocation of [`std::iter::empty`]:
365362
/// ```
366-
/// # use std::iter;
363+
/// use std::iter;
367364
/// use itertools::chain;
368365
///
369366
/// let _: iter::Empty<()> = chain!();
370367
/// let _: iter::Empty<i8> = chain!();
371368
/// ```
372369
///
373-
/// Invocations of `chain!` with one argument expand to [`arg.into_iter()`][`IntoIterator`]:
370+
/// Invocations of `chain!` with one argument expand to [`arg.into_iter()`](IntoIterator):
374371
/// ```
375372
/// use std::{ops::Range, slice};
376373
/// use itertools::chain;
377374
/// let _: <Range<_> as IntoIterator>::IntoIter = chain!((2..6),); // trailing comma optional!
378375
/// let _: <&[_] as IntoIterator>::IntoIter = chain!(&[2, 3, 4]);
379376
/// ```
380377
///
381-
/// Invocations of `chain!` with multiple arguments [`.into_iter()`][`IntoIterator`] each
378+
/// Invocations of `chain!` with multiple arguments [`.into_iter()`](IntoIterator) each
382379
/// argument, and then [`chain`] them together:
383380
/// ```
384381
/// use std::{iter::*, ops::Range, slice};

0 commit comments

Comments
 (0)