should_some

Macro should_some 

Source
macro_rules! should_some {
    (
    $($target:tt)*
) => { ... };
}
Expand description

Wraps a function that takes nothing and returns something, panicking if the result is not Some. Shortcut for should_match!.

// This macro invocation:
should_some! { ... }
// Is equivalent to:
should_match! { ..., pattern = Some(_), message = "Expected `Some`, but got `None`" }