asomers / mockall

A powerful mock object library for Rust
Apache License 2.0
1.5k stars 62 forks source link

Less Mutex poisoning #527

Closed asomers closed 7 months ago

asomers commented 10 months ago

If a test case panics while holding a static method's internal Mutex locked, for example by violating a times() constraint, then clear the Mutex's poison during Drop. We're going to delete all of its Expectations anyway, so there's no data to be poisoned.

Requires nightly.

Fixes #515

asomers commented 10 months ago

This PR depends on the https://github.com/rust-lang/rust/issues/96469 feature, which should be merged soon.