1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
//! utility stuff /// Matches a thing to a thing macro_rules! match_as { ( $($ids:ident),+; $pat:pat_param = $expr:expr ) => { match $expr { $pat => { Some(($($ids),*)) } _ => None } }; } pub(crate) use match_as;