hmap!() { /* proc-macro */ }
Expand description

Create std::collections::HashMap from list of key-value pairs.

Example

use helper::hmap;

let m = hmap! {
    "a": 1,
    "b": 2,
};
assert_eq!(m["a"], 1);
assert_eq!(m["b"], 2);