macro_rules! indexset { (@single $($x:tt)*) => { ... }; (@count $($rest:expr),*) => { ... }; ($($value:expr,)+) => { ... }; ($($value:expr),*) => { ... }; }
Expand description
Create an IndexSet
from a list of values
ยงExample
use indexmap_amortized::indexset;
let set = indexset!{
"a",
"b",
};
assert!(set.contains("a"));
assert!(set.contains("b"));
assert!(!set.contains("c"));
// "a" is the first value
assert_eq!(set.iter().next(), Some(&"a"));