Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::collections::HashSet;
- use std::rc::Rc;
- fn main() {
- let a: HashSet<Rc<String>> = HashSet::new();
- let mut b: HashSet<Rc<String>> = HashSet::new();
- b.insert(Rc::new(format!("OI")));
- let c = a.union(&b);
- let d: HashSet<Rc<String>> = c.collect();
- for i in d.iter() {
- println!("{}",i);
- }
- }
Add Comment
Please, Sign In to add comment