use the map! macro instead of defining it all over the place (#867)

* remove one map implementation in test

* remove one map macro

* remove one map macro

* remove one map macro
This commit is contained in:
guanqun
2018-10-03 20:22:58 +08:00
committed by Gav Wood
parent d14700f7b6
commit 35f3fe7e77
6 changed files with 4 additions and 29 deletions
@@ -68,12 +68,6 @@ impl GenesisConfig {
}
}
macro_rules! map {
($( $name:expr => $value:expr ),*) => (
vec![ $( ( $name, $value ) ),* ].into_iter().collect()
)
}
pub fn additional_storage_with_genesis(genesis_block: &::Block) -> HashMap<Vec<u8>, Vec<u8>> {
map![
twox_128(&b"latest"[..]).to_vec() => genesis_block.hash().0.to_vec()
+1 -1
View File
@@ -43,7 +43,7 @@ extern crate sr_version as runtime_version;
extern crate hex_literal;
#[cfg(test)]
extern crate substrate_keyring as keyring;
#[cfg_attr(test, macro_use)]
#[cfg_attr(any(feature = "std", test), macro_use)]
extern crate substrate_primitives as primitives;
#[cfg(feature = "std")] pub mod genesismap;