projects
/
rust_exercises.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8d7e73
)
Update 11_locks.md (#94)
author
Jerry Wu
<jerry@ycwu.space>
Thu, 20 Jun 2024 08:21:53 +0000
(16:21 +0800)
committer
GitHub
<noreply@github.com>
Thu, 20 Jun 2024 08:21:53 +0000
(10:21 +0200)
Suggest removing an extra semicolon.
book/src/07_threads/11_locks.md
patch
|
blob
|
history
diff --git
a/book/src/07_threads/11_locks.md
b/book/src/07_threads/11_locks.md
index
2cab7de
..
519cc95
100644
(file)
--- a/
book/src/07_threads/11_locks.md
+++ b/
book/src/07_threads/11_locks.md
@@
-99,7
+99,7
@@
fn main() {
let guard = lock.lock().unwrap();
spawn(move || {
- receiver.recv().unwrap();
;
+ receiver.recv().unwrap();
});
// Try to send the guard over the channel
@@
-118,7
+118,7
@@
error[E0277]: `MutexGuard<'_, i32>` cannot be sent between threads safely
| _-----_^
| | |
| | required by a bound introduced by this call
-11 | | receiver.recv().unwrap();
;
+11 | | receiver.recv().unwrap();
12 | | });
| |_^ `MutexGuard<'_, i32>` cannot be sent between threads safely
|