diff options
| author | John Kugelman <john@kugelman.name> | 2021-10-30 23:37:32 -0400 |
|---|---|---|
| committer | John Kugelman <john@kugelman.name> | 2021-10-30 23:37:32 -0400 |
| commit | a81d4b18ea7ee03733e983974400816684f78ebe (patch) | |
| tree | 6ad8f58e2ef27985c4350a332d5e8ec77ee2b3f9 /library/std/src/sync/mpsc | |
| parent | e249ce6b2345587d6e11052779c86adbad626dff (diff) | |
| download | rust-a81d4b18ea7ee03733e983974400816684f78ebe.tar.gz rust-a81d4b18ea7ee03733e983974400816684f78ebe.zip | |
Add #[must_use] to remaining std functions (O-Z)
Diffstat (limited to 'library/std/src/sync/mpsc')
| -rw-r--r-- | library/std/src/sync/mpsc/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sync/mpsc/mod.rs b/library/std/src/sync/mpsc/mod.rs index b4f4456537b..2cf678ef69b 100644 --- a/library/std/src/sync/mpsc/mod.rs +++ b/library/std/src/sync/mpsc/mod.rs @@ -707,6 +707,7 @@ impl<T> UnsafeFlavor<T> for Receiver<T> { /// // Let's see what that answer was /// println!("{:?}", receiver.recv().unwrap()); /// ``` +#[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub fn channel<T>() -> (Sender<T>, Receiver<T>) { let a = Arc::new(oneshot::Packet::new()); @@ -755,6 +756,7 @@ pub fn channel<T>() -> (Sender<T>, Receiver<T>) { /// assert_eq!(receiver.recv().unwrap(), 1); /// assert_eq!(receiver.recv().unwrap(), 2); /// ``` +#[must_use] #[stable(feature = "rust1", since = "1.0.0")] pub fn sync_channel<T>(bound: usize) -> (SyncSender<T>, Receiver<T>) { let a = Arc::new(sync::Packet::new(bound)); |
