expect_some

Macro expect_some 

Source
macro_rules! expect_some {
    ($expr:expr, $message:expr) => { ... };
}
Expand description

Takes an Option and returns the unwrapped Some value, or panics if it’s None. The second argument is the message to use on panic.

See also expect_ok! and unwrap_some!.