Applied review comments

This commit is contained in:
Erik Hofmayer 2020-09-21 21:31:01 +02:00
parent 3f0f40904c
commit 16eee2a04a
1 changed files with 6 additions and 0 deletions

View File

@ -1532,7 +1532,9 @@ impl<T: Send> error::Error for TrySendError<T> {
#[stable(feature = "mpsc_error_conversions", since = "1.24.0")]
impl<T> From<SendError<T>> for TrySendError<T> {
/// Converts a `SendError<T>` into a `TrySendError<T>`.
///
/// This conversion always returns a `TrySendError::Disconnected` containing the data in the `SendError<T>`.
///
/// No data is allocated on the heap.
fn from(err: SendError<T>) -> TrySendError<T> {
match err {
@ -1580,7 +1582,9 @@ impl error::Error for TryRecvError {
#[stable(feature = "mpsc_error_conversions", since = "1.24.0")]
impl From<RecvError> for TryRecvError {
/// Converts a `RecvError` into a `TryRecvError`.
///
/// This conversion always returns `TryRecvError::Disconnected`.
///
/// No data is allocated on the heap.
fn from(err: RecvError) -> TryRecvError {
match err {
@ -1613,7 +1617,9 @@ impl error::Error for RecvTimeoutError {
#[stable(feature = "mpsc_error_conversions", since = "1.24.0")]
impl From<RecvError> for RecvTimeoutError {
/// Converts a `RecvError` into a `RecvTimeoutError`.
///
/// This conversion always returns `RecvTimeoutError::Disconnected`.
///
/// No data is allocated on the heap.
fn from(err: RecvError) -> RecvTimeoutError {
match err {