Add mrg! macro for merging Maps together
This commit is contained in:
parent
7af9daf159
commit
983a7b3f5c
1 changed files with 7 additions and 0 deletions
|
@ -5,3 +5,10 @@ macro_rules! map {
|
||||||
m
|
m
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
macro_rules! mrg {
|
||||||
|
($($m:expr, $x:expr)+) => {{
|
||||||
|
$($m.extend($x.iter().map(|(k, v)| (k.clone(), v.clone())));)+
|
||||||
|
$($m)+
|
||||||
|
}};
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue