Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. enum Direction {
  2. North,
  3. East,
  4. West,
  5. South,
  6. }
  7. fn check_direction(dir: Direction) {
  8. match dir {
  9. Direction::North => println!("Going North"),
  10. Direction::South => println!("Going South"),
  11. Direction::East => println!("Going East"),
  12. Direction::West => println!("Going West"),
  13. }
  14. }
  15.  
  16. fn main() {
  17. println!("Hello, #Devcon");
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement