Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2934b19

Browse files
remove TODOs
1 parent 1388114 commit 2934b19

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

‎library/std/src/sync/oneshot.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
//! A single-producer, single-consumer (oneshot) channel.
2-
//!
3-
//! TODO more docs.
42
53
use crate::sync::mpmc;
64
use crate::sync::mpsc::{RecvError, SendError};
75
use crate::time::{Duration, Instant};
86
use crate::{error, fmt};
97

108
/// Creates a new oneshot channel, returning the sender/receiver halves.
11-
///
12-
/// TODO more docs.
139
#[must_use]
1410
#[unstable(feature = "oneshot_channel", issue = "143674")]
1511
pub fn channel<T>() -> (Sender<T>, Receiver<T>) {
@@ -22,8 +18,6 @@ pub fn channel<T>() -> (Sender<T>, Receiver<T>) {
2218
////////////////////////////////////////////////////////////////////////////////////////////////////
2319

2420
/// The sending half of a oneshot channel.
25-
///
26-
/// TODO more docs.
2721
#[unstable(feature = "oneshot_channel", issue = "143674")]
2822
pub struct Sender<T> {
2923
/// The `oneshot` channel is simply a wrapper around a `mpmc` channel.
@@ -62,8 +56,6 @@ impl<T> fmt::Debug for Sender<T> {
6256
////////////////////////////////////////////////////////////////////////////////////////////////////
6357

6458
/// The receiving half of a oneshot channel.
65-
///
66-
/// TODO more docs.
6759
#[unstable(feature = "oneshot_channel", issue = "143674")]
6860
pub struct Receiver<T> {
6961
/// The `oneshot` channel is simply a wrapper around a `mpmc` channel.
@@ -91,8 +83,6 @@ impl<T> Receiver<T> {
9183
// Fallable methods.
9284

9385
/// Attempts to return a pending value on this receiver without blocking.
94-
///
95-
/// TODO examples.
9686
#[unstable(feature = "oneshot_channel", issue = "143674")]
9787
pub fn try_recv(self) -> Result<T, TryRecvError<T>> {
9888
self.inner.try_recv().map_err(|err| match err {
@@ -103,8 +93,6 @@ impl<T> Receiver<T> {
10393

10494
/// Attempts to wait for a value on this receiver, returning an error if the corresponding
10595
/// [`Sender`] half of this channel has been dropped, or if it waits more than `timeout`.
106-
///
107-
/// TODO examples.
10896
#[unstable(feature = "oneshot_channel", issue = "143674")]
10997
pub fn recv_timeout(self, timeout: Duration) -> Result<T, RecvTimeoutError<T>> {
11098
self.inner.recv_timeout(timeout).map_err(|err| match err {
@@ -115,8 +103,6 @@ impl<T> Receiver<T> {
115103

116104
/// Attempts to wait for a value on this receiver, returning an error if the corresponding
117105
/// [`Sender`] half of this channel has been dropped, or if `deadline` is reached.
118-
///
119-
/// TODO examples.
120106
#[unstable(feature = "oneshot_channel", issue = "143674")]
121107
pub fn recv_deadline(self, deadline: Instant) -> Result<T, RecvTimeoutError<T>> {
122108
self.inner.recv_deadline(deadline).map_err(|err| match err {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /