conjure_oxide/utils/
misc.rs

1use std::collections::HashSet;
2use std::fmt::Debug;
3use std::hash::Hash;
4
5pub fn to_set<T: Eq + Hash + Debug + Clone>(a: &Vec<T>) -> HashSet<T> {
6    let mut a_set: HashSet<T> = HashSet::new();
7    for el in a {
8        a_set.insert(el.clone());
9    }
10    a_set
11}