use std::collections::HashSet; fn main() { let a = vec![1, 3, 4].into_iter().collect::>(); let b = vec![3, 5, 6].into_iter().collect::>(); println!("Set A: {:?}", a.iter().collect::>()); println!("Set B: {:?}", b.iter().collect::>()); println!("Does A contain 4? {}", a.contains(&4)); println!("Union: {:?}", a.union(&b).collect::>()); println!("Intersection: {:?}", a.intersection(&b).collect::>()); println!("Difference: {:?}", a.difference(&b).collect::>()); println!("Is A a subset of B? {}", a.is_subset(&b)); println!("Is A equal to B? {}", a == b); }