diff options
| author | Mica White <botahamec@gmail.com> | 2024-12-23 15:31:07 -0500 |
|---|---|---|
| committer | Mica White <botahamec@gmail.com> | 2024-12-23 15:33:02 -0500 |
| commit | 30d0f08b6073e9c2e545a3567838a9e1e885fea2 (patch) | |
| tree | 5763e820ed5877b39ef9745e2a9380e665ced099 /src/poisonable/poisonable.rs | |
| parent | fa4fe582f212bec3e4d9fe288aaac8c471b8e987 (diff) | |
Remove scopeguard
The scopeguard crate was being used for its `defer_on_unwind` macro.
The problem was that it runs even if the runtime was already panicking.
There aren't any changes to the macro which could have fixed this.
I instead wrote my own function to check for a specific panicking closure.
Diffstat (limited to 'src/poisonable/poisonable.rs')
| -rw-r--r-- | src/poisonable/poisonable.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/poisonable/poisonable.rs b/src/poisonable/poisonable.rs index 581fb2f..0fc66a8 100644 --- a/src/poisonable/poisonable.rs +++ b/src/poisonable/poisonable.rs @@ -162,7 +162,7 @@ impl<L> Poisonable<L> { /// /// let key = ThreadKey::get().unwrap(); /// let x = mutex.lock(key).unwrap_or_else(|mut e| { - /// *e.get_mut() = 1; + /// **e.get_mut() = 1; /// mutex.clear_poison(); /// e.into_inner() /// }); |
