Update k_macros.rs (#13)

minor tweaks
This commit is contained in:
Luke Schoen
2023-04-25 04:17:41 +10:00
committed by GitHub
parent 6ec6ec04da
commit 545e4bad2c
+2 -2
View File
@@ -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;
);