News for hackers. Stuff that matters.
Re:Small exercises to get you used to reading and writing Ru... by sanderjd on Tuesday February 02, 2016 @12:38PM (#11020924)
The only violator I found in these exercises is the one that uses mutexes. The suggested answer involves `val.lock().unwrap()`, which is (anecdotally) common in real Rust code. An error result of a mutex unlock implies that another thread panicked while holding the lock[0], so propagating that panic is likely the right answer in this case.

[0]: https://doc.rust-lang.org/std/sync/struct.Mutex.html#poisoni...

There are no comments on this comment yet.