File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ pub struct Receiver<T> {
6565/// with backpressure.
6666///
6767/// The channel will buffer up to the provided number of messages. Once the
68- /// buffer is full, attempts to ` send` new messages will wait until a message is
68+ /// buffer is full, attempts to send new messages will wait until a message is
6969/// received from the channel. The provided buffer capacity must be at least 1.
7070///
7171/// All data sent on `Sender` will become available on `Receiver` in the same
@@ -76,7 +76,7 @@ pub struct Receiver<T> {
7676///
7777/// If the `Receiver` is disconnected while trying to `send`, the `send` method
7878/// will return a `SendError`. Similarly, if `Sender` is disconnected while
79- /// trying to `recv`, the `recv` method will return a `RecvError `.
79+ /// trying to `recv`, the `recv` method will return `None `.
8080///
8181/// # Panics
8282///
Original file line number Diff line number Diff line change @@ -55,14 +55,18 @@ impl<T> From<SendError<T>> for TrySendError<T> {
5555
5656/// Error returned by `Receiver`.
5757#[ derive( Debug ) ]
58+ #[ doc( hidden) ]
59+ #[ deprecated( note = "This type is unused because recv returns an Option." ) ]
5860pub struct RecvError ( ( ) ) ;
5961
62+ #[ allow( deprecated) ]
6063impl fmt:: Display for RecvError {
6164 fn fmt ( & self , fmt : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
6265 write ! ( fmt, "channel closed" )
6366 }
6467}
6568
69+ #[ allow( deprecated) ]
6670impl Error for RecvError { }
6771
6872cfg_time ! {
You can’t perform that action at this time.
0 commit comments