fn unwrap_or_fail<F>(self, closure: F) -> T
    where
        F: FnOnce(),
    {
        match self {
            Some(e) => e,
            None => {
                closure();
                unreachable!()
            }
        }
    }
/// Attempts to unwrap and return `T`. If `None`, it will run a closure that is expected to panic.
///
/// # Panics
/// Will panic with `unreachable!()` if the closure does not panic itself.
Attempts to unwrap and return `T`. If `None`, it will run a closure that is expected to panic.
Attempts to unwrap and return ` T ` . If ` None ` it will run a closure that is expected to panic .
fn unwrap_or_fail<F>(self, closure: F) -> T
    where
        F: FnOnce(),
    {
        match self {
            Some(e) => e,
            None => {
                closure();
                unreachable!()
            }
        }
    }
fn unwrap_or_fail < F > ( self , closure : F ) -> T where F : FnOnce ( ) , { match self { Some ( e ) => e , None => { closure ( ) ; unreachable ! ( ) } } }
Attempts to unwrap and return `T`.
Attempts to unwrap and return ` T ` .
self
closure
F
self
closure
F
panics
Will panic with `unreachable!()` if the closure does not panic itself.
Will panic with ` unreachable! () ` if the closure does not panic itself .