Vendor asic-rs 0.8.1 (280 crates, offline builds) + wxWidgets 3.3.3 (pristine + patch queue); UI spec + ADR-0003; M1 on asic-rs
This commit is contained in:
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
use std::sync::LockResult;
|
||||
|
||||
pub(crate) trait LockResultExt<T> {
|
||||
fn panic_if_poisoned(self) -> T;
|
||||
}
|
||||
|
||||
impl<T> LockResultExt<T> for LockResult<T> {
|
||||
#[track_caller]
|
||||
fn panic_if_poisoned(self) -> T {
|
||||
match self {
|
||||
Ok(inner) => inner,
|
||||
Err(err) => panic!("lock poisoned by panic: {err}"),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user