macro_rules! hashset {
(@single $($x:tt)*) => { ... };
(@count $($rest:expr),*) => { ... };
($($key:expr,)+) => { ... };
($($key:expr),*) => { ... };
}
Expand description
Create a HashSet from a list of elements.
ยงExample
#[macro_use] extern crate maplit;
let set = hashset!{"a", "b"};
assert!(set.contains("a"));
assert!(set.contains("b"));
assert!(!set.contains("c"));