mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
7 lines
183 B
Rust
7 lines
183 B
Rust
use hashbrown::HashSet;
|
|
use std::iter::FromIterator;
|
|
|
|
pub fn vec_to_set<T: Clone + Eq + std::hash::Hash>(data: &Vec<T>) -> HashSet<T> {
|
|
HashSet::from_iter(data.iter().cloned())
|
|
}
|