3 ms·
The matches! macro looks awesome! Looking forward to using it a lot (especially to check variants).
by howenterprisey 7y ago
The matches! macro looks awesome! Looking forward to using it a lot (especially to check variants).
- bonzini 7y agoif let is usually good enough to check variants. Matches! should be useful to implement methods like is_some() or is_ok(). Also for assertions, but then again there is a crate that provides assert_matches!, which is more useful for this than matches! itself.