Guest User

Untitled

a guest
Oct 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. #[macro_use]
  2. extern crate lazy_static;
  3.  
  4. use std::collections::HashSet;
  5.  
  6. lazy_static! {
  7. static ref cross_actions: HashSet<&'static str> = {
  8. let h: HashSet<&str> = [
  9. "string 1",
  10. "string 2",
  11. "string 3",
  12. // etc
  13. ].iter().cloned().collect();
  14. h
  15. };
  16. }
  17.  
  18. fn main() {
  19. for s in cross_actions.iter() {
  20. println!("string: {}", s);
  21. }
  22. }
Add Comment
Please, Sign In to add comment