macro_rules! should_none {
(
$($target:tt)*
) => { ... };
}Expand description
Wraps a function that takes nothing and returns something, panicking if the result is not None. Shortcut for should_match!.
ⓘ
// This macro invocation:
should_none! { ... }
// Is equivalent to:
should_match! { ..., pattern = None, message = "Expected `None`, but got `Some`" }