use hashbrown::HashSet; use std::iter::FromIterator; pub fn vec_to_set(data: &Vec) -> HashSet { HashSet::from_iter(data.iter().cloned()) }