hyper 1.10.1

A protective and efficient HTTP library for all.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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}"),
        }
    }
}