Skip to content

Commit

Permalink
Uses unwrap instead of pattern matching
Browse files Browse the repository at this point in the history
  • Loading branch information
thyrgle committed Dec 5, 2015
1 parent 658f91a commit bfb7361
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/doc/book/concurrency.md
Expand Up @@ -295,12 +295,12 @@ fn main() {
let mut data = data.lock().unwrap();
*data += 1;

let _ = tx.send(());
tx.send(()).unwrap();
});
}

for _ in 0..10 {
let _ = rx.recv();
rx.recv().unwrap();
}
}
```
Expand All @@ -324,7 +324,7 @@ fn main() {
thread::spawn(move || {
let answer = i * i;

let _ = tx.send(answer);
tx.send(answer).unwrap();
});
}

Expand Down

0 comments on commit bfb7361

Please sign in to comment.