Hi,
I am not really sure what the correct syntax of the matches! macro is. Say I have an enum like
enum Test {
A {
value: i32
}
}
Now I know that I can match the values like following
let t = Test::A { value: 42 };
match t {
Test::A { value } if value > 40 => {
println!("Greater than 40");
},
Test::A { value } => {
println!("{}", value);
}
}
where the first guard could be asserted with
assert!(matches!(t, Test::A { value } if value > 40 ));
but can I also assert the second guard? Shouldn't this be possible?:
assert!(matches!(t, Test::A { value } => { ... }));