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