DebuglessUnwrapExt

Trait DebuglessUnwrapExt 

Source
pub trait DebuglessUnwrapExt {
    type Unwrapped;

    // Required method
    fn debugless_unwrap(self) -> Self::Unwrapped;
}
Expand description

Provides .debugless_unwrap() on Result.

§Example

use assert_panic::assert_panic;
use debugless_unwrap::DebuglessUnwrapExt;

struct T;

 let ok = Result::<T, T>::Ok(T);
 let err = Result::<T, T>::Err(T);

ok.debugless_unwrap();

assert_panic!({ err.debugless_unwrap(); });

Required Associated Types§

Required Methods§

Implementations on Foreign Types§

Source§

impl<T, E> DebuglessUnwrapExt for Result<T, E>

Implementors§