about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/doc/book/concurrency.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/book/concurrency.md b/src/doc/book/concurrency.md
index cc6cfc2f4a0..8ea6f4f6fcc 100644
--- a/src/doc/book/concurrency.md
+++ b/src/doc/book/concurrency.md
@@ -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();
         });
     }