about summary refs log tree commit diff
path: root/src/libstd/sync
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-04-15 18:23:39 +0200
committerGitHub <noreply@github.com>2019-04-15 18:23:39 +0200
commit92702c1cffe5d025e2e3235c9ccc1a06896e43ae (patch)
treebfad8e3a9588411eb9902b05962d2bdf5c0dfb11 /src/libstd/sync
parent9217fe0e2f04d61dd29c9aaebee2c993705e1d26 (diff)
parentce5d69480a644011acedd3072eaef61cd72e5850 (diff)
downloadrust-92702c1cffe5d025e2e3235c9ccc1a06896e43ae.tar.gz
rust-92702c1cffe5d025e2e3235c9ccc1a06896e43ae.zip
Rollup merge of #59648 - alex:must-use-result, r=alexcrichton
Add must_use annotations to Result::is_ok and is_err

Discussed in #59610
Diffstat (limited to 'src/libstd/sync')
-rw-r--r--src/libstd/sync/mpsc/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/sync/mpsc/mod.rs b/src/libstd/sync/mpsc/mod.rs
index bc32b8e47b3..685c7909ff2 100644
--- a/src/libstd/sync/mpsc/mod.rs
+++ b/src/libstd/sync/mpsc/mod.rs
@@ -1005,7 +1005,7 @@ impl<T> SyncSender<T> {
     /// thread::spawn(move || {
     ///     // This will return an error and send
     ///     // no message if the buffer is full
-    ///     sync_sender2.try_send(3).is_err();
+    ///     let _ = sync_sender2.try_send(3);
     /// });
     ///
     /// let mut msg;