Guest User

Untitled

a guest
May 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. use std::collections::HashSet;
  2. use std::rc::Rc;
  3.  
  4. fn main() {
  5. let a: HashSet<Rc<String>> = HashSet::new();
  6. let mut b: HashSet<Rc<String>> = HashSet::new();
  7. b.insert(Rc::new(format!("OI")));
  8. let c = a.union(&b);
  9. let d: HashSet<Rc<String>> = c.collect();
  10.  
  11. for i in d.iter() {
  12. println!("{}",i);
  13. }
  14. }
Add Comment
Please, Sign In to add comment