pub(crate) fn abort_on_panic<T>(f: impl FnOnce() -> T) -> T
Calls a function and aborts if it panics.
This is useful in unsafe code where we can’t recover from panics.