abort_on_panic

Function abort_on_panic 

Source
pub(crate) fn abort_on_panic<T>(f: impl FnOnce() -> T) -> T
Expand description

Calls a function and aborts if it panics.

This is useful in unsafe code where we can’t recover from panics.