diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index dd8892d6660f..425cb0ada08e 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -425,15 +425,15 @@ pub fn spawn(self, f: F) -> io::Result> where /// let (tx, rx) = channel(); /// /// let sender = thread::spawn(move || { -/// tx.send("Hello, thread".to_owned()); +/// let _ = tx.send("Hello, thread".to_owned()); /// }); /// /// let receiver = thread::spawn(move || { /// println!("{}", rx.recv().unwrap()); /// }); /// -/// sender.join(); -/// receiver.join(); +/// let _ = sender.join(); +/// let _ = receiver.join(); /// ``` /// /// A thread can also return a value through its [`JoinHandle`], you can use @@ -449,7 +449,7 @@ pub fn spawn(self, f: F) -> io::Result> where /// }); /// /// let result = computation.join().unwrap(); -/// println!("{}", v); +/// println!("{}", result); /// ``` /// /// [`channels`]: ../../std/sync/mpsc/index.html