98335f435d
type: added
9 lines
192 B
Rust
9 lines
192 B
Rust
macro_rules! matches {
|
|
($expression:expr, $( $pattern:pat )|+ $( if $guard: expr )?) => {
|
|
match $expression {
|
|
$( $pattern )|+ $( if $guard )? => true,
|
|
_ => false
|
|
}
|
|
}
|
|
}
|