macro_rules! tst {
() => { ... };
($($key:expr => $value:expr,)+) => { ... };
($($key: expr => $val: expr),*) => { ... };
}
Expand description
A shortcut macro to help create a small tree with a list of known "key" => value
pairs. Calls insert
on each pair, in order.
let map = tst!["fo" => "๐", "bar" => "๐", "baz" => "ใต
", "fooo" => "๐๐๐"];
assert_eq!(map.len(), 4)