Macro nem

Source
macro_rules! nem {
    ($hk:expr => $hv:expr, $( $xk:expr => $xv:expr ),* $(,)?) => { ... };
    ($hk:expr => $hv:expr) => { ... };
}
Expand description

Like the crate::nev! macro, but for Maps. A nice short-hand for constructing NEMap values.

use nonempty_collections::nem;

let m = nem! {"elves" => 3000, "orcs" => 10000};
assert_eq!(2, m.len().get());