From bf185b61ffe579e1ada0e920847692f7480489fa Mon Sep 17 00:00:00 2001 From: Mattia Pitossi Date: Sat, 17 Jan 2026 19:10:59 +0100 Subject: [PATCH] docs: fix broken links of `select!` (#7860) Co-authored-by: Martin Grigorov --- tokio-stream/src/stream_map.rs | 8 +++++--- tokio-util/src/io/simplex.rs | 13 ++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tokio-stream/src/stream_map.rs b/tokio-stream/src/stream_map.rs index 1892e9b35..fa9355cb3 100644 --- a/tokio-stream/src/stream_map.rs +++ b/tokio-stream/src/stream_map.rs @@ -579,9 +579,11 @@ where /// # Cancel safety /// /// This method is cancel safe. If `next_many` is used as the event in a - /// [`tokio::select!`](tokio::select) statement and some other branch - /// completes first, it is guaranteed that no items were received on any of - /// the underlying streams. + /// [`tokio::select!`] statement and some other branch completes first, + /// it is guaranteed that no items were received on any of the underlying + /// streams. + /// + /// [`tokio::select!`]: https://docs.rs/tokio/latest/tokio/macro.select.html pub async fn next_many(&mut self, buffer: &mut Vec<(K, V::Item)>, limit: usize) -> usize { poll_fn(|cx| self.poll_next_many(cx, buffer, limit)).await } diff --git a/tokio-util/src/io/simplex.rs b/tokio-util/src/io/simplex.rs index de9f9bfd9..5aaf44e0d 100644 --- a/tokio-util/src/io/simplex.rs +++ b/tokio-util/src/io/simplex.rs @@ -88,13 +88,15 @@ impl Inner { /// # Cancellation safety /// /// The `Receiver` is cancel safe. If it is used as the event in a -/// [`tokio::select!`](macro@tokio::select) statement and some other branch -/// completes first, it is guaranteed that no bytes were received on this +/// [`tokio::select!`] statement and some other branch completes +/// first, it is guaranteed that no bytes were received on this /// channel. /// /// You can still read the remaining data from the buffer /// even if the write half has been dropped. /// See [`Sender::poll_shutdown`] and [`Sender::drop`] for more details. +/// +/// [`tokio::select!`]: https://docs.rs/tokio/latest/tokio/macro.select.html #[derive(Debug)] pub struct Receiver { inner: Arc>, @@ -163,13 +165,14 @@ impl AsyncRead for Receiver { /// # Cancellation safety /// /// The `Sender` is cancel safe. If it is used as the event in a -/// [`tokio::select!`](macro@tokio::select) statement and some other branch -/// completes first, it is guaranteed that no bytes were sent on this -/// channel. +/// [`tokio::select!`] statement and some other branch completes +/// first, it is guaranteed that no bytes were sent on this channel. /// /// # Shutdown /// /// See [`Sender::poll_shutdown`]. +/// +/// [`tokio::select!`]: https://docs.rs/tokio/latest/tokio/macro.select.html #[derive(Debug)] pub struct Sender { inner: Arc>,