Auto merge of #30221 - thyrgle:concurrency_doc, r=alexcrichton

The example code in the Channels subsection of the rust book give warnings about

    unused result which must be used, #[warn(unused_must_use)] on by default

Added a small pattern match to resolve those warnings.
This commit is contained in:
bors 2015-12-06 08:50:49 +00:00
commit 078aff8928

View File

@ -295,12 +295,12 @@ fn main() {
let mut data = data.lock().unwrap();
*data += 1;
tx.send(());
tx.send(()).unwrap();
});
}
for _ in 0..10 {
rx.recv();
rx.recv().unwrap();
}
}
```
@ -324,7 +324,7 @@ fn main() {
thread::spawn(move || {
let answer = i * i;
tx.send(answer);
tx.send(answer).unwrap();
});
}