use std::collections::HashSet;
fn main() {
let mut first = HashSet::new();
let mut second = HashSet::new();
first.insert(1);
second.insert(2);
let mut combined = first;
combined.extend(second.into_iter());
println!("{:?}", combined)
}
Thanks! Extend is a trait and that's why I couldn't find extend() listed as a method on HashSet. However, as expected, it is listed as a trait that HashSet implements.