assert_matches2
A replacement for the assert_matches
crate, providing an assert_matches!
macro without support for if
guards and the extra arm, but bringing any
names introduced in the pattern into scope for after the macro invocation, by
expanding to let else
.
Example
use assert_matches;
let var = Foo ;
assert_matches!;
assert_matches!;
assert_eq!;
let var = Foo ;
assert_matches!;
assert_eq!;