Optimize the map builder macros (#1483)
This commit is contained in:
parent
20cbbb203e
commit
3f26273128
1 changed files with 3 additions and 3 deletions
|
@ -6,9 +6,9 @@ macro_rules! bytes {
|
||||||
|
|
||||||
macro_rules! map {
|
macro_rules! map {
|
||||||
($($k:expr => $v:expr),* $(,)?) => {{
|
($($k:expr => $v:expr),* $(,)?) => {{
|
||||||
let mut m = ::std::collections::BTreeMap::new();
|
::std::collections::BTreeMap::from([
|
||||||
$(m.insert($k, $v);)+
|
$(($k, $v),)+
|
||||||
m
|
])
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue