Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[derive(Clone)]
- enum TestEnum {
- One,
- Two
- }
- fn bar(a: Vec<TestEnum>, b: TestEnum) {
- }
- fn foo(a: Vec<TestEnum>) {
- for i in a {
- bar(a.clone(), i);
- }
- }
- fn main() {
- let a: Vec<TestEnum> = vec![TestEnum::One, TestEnum::Two];
- foo(a);
- }
Add Comment
Please, Sign In to add comment