Add mrg! macro for merging Maps together

This commit is contained in:
Tobie Morgan Hitchcock 2022-07-04 01:59:59 +01:00
parent 7af9daf159
commit 983a7b3f5c

View file

@ -5,3 +5,10 @@ macro_rules! map {
m
}};
}
macro_rules! mrg {
($($m:expr, $x:expr)+) => {{
$($m.extend($x.iter().map(|(k, v)| (k.clone(), v.clone())));)+
$($m)+
}};
}