1 2 3 4 5 6 7 8 9 10 11 12 13
use std::{collections::HashSet, hash::Hash}; pub fn unordered_vec_compare<T: Hash + Eq>(a: Vec<T>, b: Vec<T>) -> bool { let mut set_a = HashSet::new(); for i in a { set_a.insert(i); } let mut set_b = HashSet::new(); for j in b { set_b.insert(j); } set_a == set_b }