X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/3530068c5bbcbd9185757369dd23b9edb3bbc9ad..e6c369cfcd2d8ae38eb9c5cfbbee685bae2fe64d:/src/part15.rs diff --git a/src/part15.rs b/src/part15.rs index f60a481..b1cab06 100644 --- 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.2**: Rather than panicking in case the lock is poisoned, we can use `into_innter` 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` @@ -145,4 +145,4 @@ pub fn main() { //@ [Rust RFC](https://github.com/rust-lang/rfcs/blob/master/text/0458-send-improvements.md), which contains a type `RcMut` that would be `Sync` and not `Send`. //@ You may also be interested in [this blog post](https://huonw.github.io/blog/2015/02/some-notes-on-send-and-sync/) on the topic. -//@ [index](main.html) | [previous](part14.html) | [raw source](https://www.ralfj.de/git/rust-101.git/blob_plain/HEAD:/workspace/src/part15.rs) | [next](part16.html) +//@ [index](main.html) | [previous](part14.html) | [raw source](workspace/src/part15.rs) | [next](part16.html)