#unwrap #panic #no-std

no-std unwrap_or_panic

Unwrap a Result<T, E> without formating the Error E and no trait bound E: Debug

7 releases

0.3.0 Apr 25, 2023
0.2.3 Apr 24, 2023
0.2.1 Mar 13, 2023
0.1.1 Mar 11, 2023

#29 in #unwrap

26 downloads per month

MIT/Apache

3KB

Unwrap a Result<T, E> without the trait bound E: Debug for the Error.

Unlike unwrap, this does not format the error with fmt::Debug.

Usage

use unwrap_or_panic::UnwrapOrPanic;

Err::<i32, i32>(-1).unwrap_or_panic();    // panic with msg `Panic at <FILE>:<LINE>:<COLUME>`

No runtime deps

Features