dtt

Macro dtt_map

Source
macro_rules! dtt_map {
    ($($key:expr => $value:expr),* $(,)?) => { ... };
}
Expand description

Creates a new map of the given key-value pairs.

§Arguments

  • $($key:expr => $value:expr),*: The key-value pairs to be added to the map.

§Example

use dtt::dtt_map;

let m = dtt_map!("one" => 1, "two" => 2);
assert_eq!(m.get("one"), Some(&1));
assert_eq!(m.get("two"), Some(&2));