blob: 26d4c96d52433c296a823aadbf5c5614542b3abe (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// edition:2018
#[macro_export]
macro_rules! custom_matches {
($expression:expr, $( $pattern:pat )|+ $( if $guard: expr )? $(,)?) => {
match $expression {
$( $pattern )|+ $( if $guard )? => true,
_ => false
}
}
}
|