Macro map_macro::hash_set

source ·
macro_rules! hash_set {
    {$($v: expr),* $(,)?} => { ... };
}
Available on crate feature std only.
Expand description

Macro for creating a HashSet.

Syntactic sugar for HashSet::from.

§Examples

use map_macro::hash_set;

let x = hash_set! { 1, 2, 3, 3, 4 };

assert_eq!(x.len(), 4);