Re:Speeding Up the Rust Compiler
by frenchman99 on Wednesday December 11, 2019 @08:23AM
(#21762085)
Most of the code you're linking to is unit tests, not application code.
No, I am thinking of application code. If you're trying to handle a poisoned mutex, you're doing something wrong.
Re:Speeding Up the Rust Compiler
by crematoria on Wednesday December 11, 2019 @10:52AM
(#21763568)
Yeah, most of that code is stuff like examples and tests, and most errors should be forwarded, not unwrapped. But yeah, of course if a resource that you depend on is potentially in an invalid state thanks to a thread crashing, it makes perfect sense to unwrap / expect.
522 results in servo. Granted, some (but not all) are in tests.
`.unwrap()` is expected to be in every code base out there, as there is rarely much point in handling errors such as tainted mutex locks.