From 905137bde5daf45d17335ae29d75f719144838b8 Mon Sep 17 00:00:00 2001 From: yjhn Date: Mon, 5 Sep 2022 17:12:37 +0300 Subject: [PATCH 1/2] improve docs of channel creation functions --- crossbeam-channel/src/channel.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crossbeam-channel/src/channel.rs b/crossbeam-channel/src/channel.rs index 7871bcb70..c580d84f2 100644 --- a/crossbeam-channel/src/channel.rs +++ b/crossbeam-channel/src/channel.rs @@ -16,10 +16,12 @@ use crate::flavors; use crate::select::{Operation, SelectHandle, Token}; use crate::utils; -/// Creates a channel of unbounded capacity. +/// Creates a multi-producer multi-consumer channel of unbounded capacity. /// /// This channel has a growable buffer that can hold any number of messages at a time. /// +/// For more info on how to use it see [module level documentation](index.html). +/// /// # Examples /// /// ``` @@ -54,13 +56,15 @@ pub fn unbounded() -> (Sender, Receiver) { (s, r) } -/// Creates a channel of bounded capacity. +/// Creates a multi-producer multi-consumer channel of bounded capacity. /// /// This channel has a buffer that can hold at most `cap` messages at a time. /// /// A special case is zero-capacity channel, which cannot hold any messages. Instead, send and /// receive operations must appear at the same time in order to pair up and pass the message over. /// +/// For more info on how to use it see [module level documentation](index.html). +/// /// # Examples /// /// A channel of capacity 1: From 05ed068701222fab864e804dced336c77cf3d411 Mon Sep 17 00:00:00 2001 From: yjhn Date: Mon, 5 Sep 2022 17:21:08 +0300 Subject: [PATCH 2/2] be more explicit --- crossbeam-channel/src/channel.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crossbeam-channel/src/channel.rs b/crossbeam-channel/src/channel.rs index c580d84f2..4ace4de39 100644 --- a/crossbeam-channel/src/channel.rs +++ b/crossbeam-channel/src/channel.rs @@ -20,7 +20,7 @@ use crate::utils; /// /// This channel has a growable buffer that can hold any number of messages at a time. /// -/// For more info on how to use it see [module level documentation](index.html). +/// For more info on how to use the channel see [module level documentation](index.html). /// /// # Examples /// @@ -63,7 +63,7 @@ pub fn unbounded() -> (Sender, Receiver) { /// A special case is zero-capacity channel, which cannot hold any messages. Instead, send and /// receive operations must appear at the same time in order to pair up and pass the message over. /// -/// For more info on how to use it see [module level documentation](index.html). +/// For more info on how to use the channel see [module level documentation](index.html). /// /// # Examples ///