Macro assert_none

Source
macro_rules! assert_none {
    ($option:expr) => { ... };
}
Expand description

Asserts that an Option is None

§Parameters

  • &option A reference to an Option.

§Dependencies

  • All content must implement Debug

§Examples

use totems::assert_none;
let option = "z".parse::<u32>().ok();
assert_none!(&option);

§Example Error Messages

thread 'enums::none::is_some' panicked at 'assertion failed: (&option is None)
 &option: Some(5)
', src/enums.rs:743:9