Using a static method in two or more test cases requires synchronization, such as with a Mutex. Previously we recommended adding a let _m = SOME_MTX.lock().unwrap() to the top of each such test case. But if one test case should fail, then the others will fail too due to a poisoned mutex. It turns out that the .unwrap() is completely unnecessary; a poisoned Mutex still provides the necessary synchronization. So simply remove all of the unwraps.
Using a static method in two or more test cases requires synchronization, such as with a Mutex. Previously we recommended adding a
let _m = SOME_MTX.lock().unwrap()
to the top of each such test case. But if one test case should fail, then the others will fail too due to a poisoned mutex. It turns out that the.unwrap()
is completely unnecessary; a poisoned Mutex still provides the necessary synchronization. So simply remove all of the unwraps.