android-binder 0.2.1

Safe bindings to Android Binder, restricted to the NDK
/// A macro that allows working with std and spin Mutexes
/// when you're ok panicking on a poisoned Mutex.
#[cfg(all(feature = "std", not(single_threaded)))]
#[macro_export]
macro_rules! panic_if_poisoned {
    ( $poisonable:expr_2021 ) => {
        $poisonable.unwrap()
    };
}

/// A macro that allows working with std and spin Mutexes
/// when you're ok panicking on a poisoned Mutex.
#[cfg(single_threaded)]
#[macro_export]
macro_rules! panic_if_poisoned {
    ( $unpoisonable:expr_2021 ) => {
        // spin::Mutex does not support poisoning and returns
        // a MutexGuard directly
        $unpoisonable
    };
}