Skip to content

Commit

Permalink
Specify type returned when awaiting a oneshot::Receiver
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai committed Nov 16, 2022
1 parent a668020 commit 850c95f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokio/src/sync/oneshot.rs
Expand Up @@ -227,7 +227,7 @@ pub struct Sender<T> {
/// [`channel`](fn@channel) function.
///
/// This channel has no `recv` method because the receiver itself implements the
/// [`Future`] trait. To receive a value, `.await` the `Receiver` object directly.
/// [`Future`] trait. To receive a `Result<T, `[`error::RecvError`]`>`, `.await` the `Receiver` object directly.
///
/// The `poll` method on the `Future` trait is allowed to spuriously return
/// `Poll::Pending` even if the message has been sent. If such a spurious
Expand Down

0 comments on commit 850c95f

Please sign in to comment.