Add util, fix fetch DMs, fully implement delete.

This commit is contained in:
Paul Makles
2020-04-09 18:33:08 +01:00
parent e92b686410
commit 8a4a386ec5
6 changed files with 115 additions and 23 deletions

6
src/util/mod.rs Normal file
View File

@@ -0,0 +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> {
HashSet::from_iter(data.iter().cloned())
}