From cd7fb9dec248fc6a79d3af96cc86297363b3a5be Mon Sep 17 00:00:00 2001 From: Jonathas-Conceicao Date: Mon, 13 Jul 2020 10:37:18 -0300 Subject: [PATCH] channel doc: Fix misleading reference to None return on Receiver Signed-off-by: Jonathas-Conceicao --- src/sync/channel.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sync/channel.rs b/src/sync/channel.rs index 3207846c..928cfc5d 100644 --- a/src/sync/channel.rs +++ b/src/sync/channel.rs @@ -22,8 +22,8 @@ use crate::sync::WakerSet; /// This channel has a buffer that can hold at most `cap` messages at a time. /// /// Senders and receivers can be cloned. When all senders associated with a channel get dropped, it -/// becomes closed. Receive operations on a closed and empty channel return `None` instead of -/// trying to await a message. +/// becomes closed. Receive operations on a closed and empty channel return [RecvError] instead of +/// trying to await a message when using [Receiver::recv] or `None` when used as a [Stream]. /// /// # Panics /// @@ -376,7 +376,7 @@ impl Receiver { /// /// If the channel is empty and still has senders, this method /// will wait until a message is sent into it. Once all senders - /// have been dropped it will return `None`. + /// have been dropped it will return [RecvError]. /// /// # Examples ///