@@ -312,13 +312,13 @@ mod spsc_queue;
312
312
/// use std::time::Duration;
313
313
/// let (send, recv) = channel();
314
314
/// thread::spawn(move || {
315
- /// send.send("Hello world!");
315
+ /// send.send("Hello world!").unwrap() ;
316
316
/// thread::sleep(Duration::from_secs(2)); // block for two seconds
317
- /// send.send("Delayed for 2 seconds");
317
+ /// send.send("Delayed for 2 seconds").unwrap() ;
318
318
/// });
319
- /// println!("{:? }", recv.recv()); // Received immediately
319
+ /// println!("{}", recv.recv().unwrap ()); // Received immediately
320
320
/// println!("Waiting...");
321
- /// println!("{:? }", recv.recv()); // Received after 2 seconds
321
+ /// println!("{}", recv.recv().unwrap ()); // Received after 2 seconds
322
322
/// ```
323
323
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
324
324
pub struct Receiver < T > {
@@ -388,11 +388,11 @@ pub struct IntoIter<T> {
388
388
/// let sender2 = sender.clone();
389
389
/// // First thread owns sender
390
390
/// thread::spawn(move || {
391
- /// sender.send(1);
391
+ /// sender.send(1).unwrap() ;
392
392
/// });
393
393
/// // Second thread owns sender2
394
394
/// thread::spawn(move || {
395
- /// sender2.send(2);
395
+ /// sender2.send(2).unwrap() ;
396
396
/// });
397
397
/// let msg = receiver.recv().unwrap();
398
398
/// let msg2 = receiver.recv().unwrap();
@@ -1099,9 +1099,9 @@ impl<T> Receiver<T> {
1099
1099
/// use std::thread;
1100
1100
/// let (send, recv) = channel();
1101
1101
/// thread::spawn(move || {
1102
- /// send.send(1u8);
1103
- /// send.send(2u8);
1104
- /// send.send(3u8);
1102
+ /// send.send(1u8).unwrap() ;
1103
+ /// send.send(2u8).unwrap() ;
1104
+ /// send.send(3u8).unwrap() ;
1105
1105
/// });
1106
1106
/// for x in recv.iter() {
1107
1107
/// println!("Got: {}", x);
0 commit comments