Skip to content

Commit 202086e

Browse files
author
Felix Raimundo
committed
Fix warnings in examples
1 parent 656efcd commit 202086e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libstd/thread/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,15 +425,15 @@ impl Builder {
425425
/// let (tx, rx) = channel();
426426
///
427427
/// let sender = thread::spawn(move || {
428-
/// tx.send("Hello, thread".to_owned());
428+
/// let _ = tx.send("Hello, thread".to_owned());
429429
/// });
430430
///
431431
/// let receiver = thread::spawn(move || {
432432
/// println!("{}", rx.recv().unwrap());
433433
/// });
434434
///
435-
/// sender.join();
436-
/// receiver.join();
435+
/// let _ = sender.join();
436+
/// let _ = receiver.join();
437437
/// ```
438438
///
439439
/// A thread can also return a value through its [`JoinHandle`], you can use
@@ -449,7 +449,7 @@ impl Builder {
449449
/// });
450450
///
451451
/// let result = computation.join().unwrap();
452-
/// println!("{}", v);
452+
/// println!("{}", result);
453453
/// ```
454454
///
455455
/// [`channels`]: ../../std/sync/mpsc/index.html

0 commit comments

Comments
 (0)