some macros for dicts
creates hashmap
, hashset
, btreeset
, btreemap
map has two sytaxts
let a = 1;
let b = 2;
hashmap![
a: a+b,
b: b
],
is equal to
std::collections::HashMap::from([(a, a), (b, a + b)])
but if you dont include commas it acts like yml and gets names from ident
hashmap![
a: a+b
b: b
],
is equal to
std::collections::HashMap::from([("a", a + b), ("b", b)])