mirror of
https://github.com/pezkuwichain/kurdistan_blockchain-akademy.git
synced 2026-06-14 06:21:06 +00:00
+2
-2
@@ -9,7 +9,7 @@
|
||||
// Your task here is to create an analogous macro for creating hashmaps pre-populated with literal
|
||||
// values. The macro should be called like follows:
|
||||
//
|
||||
// let map1: HashMap<u32, u32> = map![1 =>2, 3 => 4, 5 => 6];
|
||||
// let map1: HashMap<u32, u32> = map![1 => 2, 3 => 4, 5 => 6];
|
||||
#[macro_export]
|
||||
macro_rules! map {
|
||||
( $($todo:tt)* ) => {
|
||||
@@ -94,7 +94,7 @@ mod tests {
|
||||
Foo: u32 = 10;
|
||||
// should generate `pub struct Bar` that implements `Get<u32>`
|
||||
pub Bar: u32 = 42;
|
||||
// should generate `pub struct Baz` that has implements `Get<u16>`.
|
||||
// should generate `pub struct Baz` that implements `Get<u16>`.
|
||||
pub Baz: u16 = 21;
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user