projects
/
rust-101.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
57fd78e
)
re-do deepaksirone's fix on the actual source file
author
Ralf Jung
<post@ralfj.de>
Mon, 13 Jun 2016 12:01:47 +0000
(14:01 +0200)
committer
Ralf Jung
<post@ralfj.de>
Mon, 13 Jun 2016 12:01:47 +0000
(14:01 +0200)
src/part15.rs
patch
|
blob
|
history
diff --git
a/src/part15.rs
b/src/part15.rs
index f60a481bfc7a3302f9bfe6f04f0695ab88746db5..6c99f4d726fe0f2a2e05b0e3cda17059f917587f 100644
(file)
--- a/
src/part15.rs
+++ b/
src/part15.rs
@@
-100,7
+100,7
@@
pub fn main() {
// **Exercise 15.1**: Add an operation `compare_and_inc(&self, test: usize, by: usize)` that increments the counter by
// `by` *only if* the current value is `test`.
//
// **Exercise 15.1**: Add an operation `compare_and_inc(&self, test: usize, by: usize)` that increments the counter by
// `by` *only if* the current value is `test`.
//
-// **Exercise 15.2**: Rather than panicking in case the lock is poisoned, we can use `into_inn
t
er` on the error to recover
+// **Exercise 15.2**: Rather than panicking in case the lock is poisoned, we can use `into_inner` on the error to recover
// the data inside the lock. Change the code above to do that. Try using `unwrap_or_else` for this job.
//@ ## `RwLock`
// the data inside the lock. Change the code above to do that. Try using `unwrap_or_else` for this job.
//@ ## `RwLock`