From dcb6f778e8859495e7c79e72493d009afa3861ef Mon Sep 17 00:00:00 2001 From: Marcin Puc Date: Sun, 2 May 2021 19:17:08 +0200 Subject: [PATCH] Refine links in docs for the chain! macro --- src/lib.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 4a088c514..8d4705a60 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -354,23 +354,20 @@ macro_rules! izip { /// The comma-separated arguments must implement [`IntoIterator`]. /// The final argument may be followed by a trailing comma. /// -/// [`chain`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.chain -/// [`IntoIterator`]: https://doc.rust-lang.org/std/iter/trait.IntoIterator.html +/// [`chain`]: Iterator::chain /// /// # Examples /// -/// [`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html -/// -/// Empty invocations of `chain!` expand to an invocation of [`iter::empty`]: +/// Empty invocations of `chain!` expand to an invocation of [`std::iter::empty`]: /// ``` -/// # use std::iter; +/// use std::iter; /// use itertools::chain; /// /// let _: iter::Empty<()> = chain!(); /// let _: iter::Empty = chain!(); /// ``` /// -/// Invocations of `chain!` with one argument expand to [`arg.into_iter()`][`IntoIterator`]: +/// Invocations of `chain!` with one argument expand to [`arg.into_iter()`](IntoIterator): /// ``` /// use std::{ops::Range, slice}; /// use itertools::chain; @@ -378,7 +375,7 @@ macro_rules! izip { /// let _: <&[_] as IntoIterator>::IntoIter = chain!(&[2, 3, 4]); /// ``` /// -/// Invocations of `chain!` with multiple arguments [`.into_iter()`][`IntoIterator`] each +/// Invocations of `chain!` with multiple arguments [`.into_iter()`](IntoIterator) each /// argument, and then [`chain`] them together: /// ``` /// use std::{iter::*, ops::Range, slice};