Crate unwrap_or_panic

source ·
Expand description

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>`

Traits