Guest User

Untitled

a guest
Jun 14th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #[derive(Clone)]
  2. enum TestEnum {
  3. One,
  4. Two
  5. }
  6.  
  7. fn bar(a: Vec<TestEnum>, b: TestEnum) {
  8. }
  9.  
  10. fn foo(a: Vec<TestEnum>) {
  11. for i in a {
  12. bar(a.clone(), i);
  13. }
  14. }
  15.  
  16. fn main() {
  17. let a: Vec<TestEnum> = vec![TestEnum::One, TestEnum::Two];
  18. foo(a);
  19. }
Add Comment
Please, Sign In to add comment