Macro arith::arithmap [−][src]
macro_rules! arithmap { (@single $($x:tt)*) => { ... }; (@count $($rest:expr),*) => { ... }; ($($key:expr => $value:expr,)+) => { ... }; ($($key:expr => $value:expr),*) => { ... }; }
Expand description
let map = arithmap!{"a" => 1, "b" => 2}; assert_eq!(map.hashmap["a"], 1); assert_eq!(map.hashmap["b"], 2); assert_eq!(map.hashmap.get("c"), None);