Skip to content

Commit 7e4b3e7

Browse files
authored
macros: Additional syntax for hashmap override (#951)
- Some students implement the solution in different ways. This ensures that they prefix the namespace to make sure no one overrides it.
1 parent 23bcc30 commit 7e4b3e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

exercises/macros/tests/macros.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ fn test_type_override() {
109109
}
110110
}
111111

112-
let _computed = hashmap!(1 => 2, 3 => 4);
112+
let _empty: ::std::collections::HashMap<(), ()> = hashmap!();
113+
let _without_comma = hashmap!(1 => 2, 3 => 4);
114+
let _with_trailing = hashmap!(1 => 2, 3 => 4,);
113115
}
114116

115117
#[test]

0 commit comments

Comments
 (0)