Add / remove from group + clean up code.

This commit is contained in:
Paul Makles
2020-04-10 13:09:04 +01:00
parent 83f1fbe747
commit a910bd657a
8 changed files with 173 additions and 95 deletions

View File

@@ -1,6 +1,6 @@
use hashbrown::HashSet;
use std::iter::FromIterator;
pub fn vec_to_set<T: Clone + Eq + std::hash::Hash>(data: &Vec<T>) -> HashSet<T> {
pub fn vec_to_set<T: Clone + Eq + std::hash::Hash>(data: &[T]) -> HashSet<T> {
HashSet::from_iter(data.iter().cloned())
}