wl-client 0.2.0

Safe client-side libwayland wrapper
Documentation
1
2
3
4
5
6
7
8
use run_on_drop::on_drop;

pub(crate) fn abort_on_panic<T>(f: impl FnOnce() -> T) -> T {
    let abort = on_drop(|| std::process::abort());
    let res = f();
    abort.forget();
    res
}