Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. enum Foo {
  2. ONE,
  3. TWO,
  4. }
  5.  
  6. fn teszt(tt: Foo) {
  7. match tt {
  8. Foo::ONE => println!("ONE ..."),
  9. Foo::TWO => println!("TWO ..."),
  10. }
  11. }
  12.  
  13. fn main() {
  14. teszt(Foo::TWO);
  15. teszt(Foo::ONE);
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement