map 1.1.0

This crate provides a `map!` macro that creates a HashMap then inserts key-value pairs.
Documentation

map! Rust crate

This crate provides a macro map!.

The macro creates a map collection then insert key-value pairs.

The macro uses the Rust standard library HashMap.

Standard Rust looks like this:

let mut m = std::collections::HashMap::new();
m.insert(1, 2);
m.insert(3, 4);

The map! macro provides this syntax with parentheses:

# use map::*;
let m = map!(
    (1, 2),
    (3, 4),
);

The map! macro provides this syntax with arrows:

# use map::*;
let m = map!(
    1 => 2,
    3 => 4,
);

You can use multiple lines or one line, as you prefer.

You can use trailing commas or not, as you prefer.