assert_matches

Macro assert_matches 

Source
macro_rules! assert_matches {
    ($expr:expr, $pat:pat $(,)?) => { ... };
}
Expand description

Asserts that the expression matches the pattern.

This is equivalent to assert!(matches!(...)) except that it produces nicer errors.