allow trailing comma (#10841)

This commit is contained in:
Tarekk Mohamed Abdalla authored and GitHub committed 2022-02-11 14:38:58 +00:00
1 parent b932e27e5b
commit 89dfae9530
1 file changed
+5 -1
+5 -1
View File
@@ -28,9 +28,13 @@
doc = "Substrate's runtime standard library as compiled without Rust's standard library."
)]
/// Initialize a key-value collection from array.
///
/// Creates a vector of given pairs and calls `collect` on the iterator from it.
/// Can be used to create a `HashMap`.
#[macro_export]
macro_rules! map {
($( $name:expr => $value:expr ),*) => (
($( $name:expr => $value:expr ),* $(,)? ) => (
vec![ $( ( $name, $value ) ),* ].into_iter().collect()
)
}