Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enum Direction {
- North,
- East,
- West,
- South,
- }
- fn check_direction(dir: Direction) {
- match dir {
- Direction::North => println!("Going North"),
- Direction::South => println!("Going South"),
- Direction::East => println!("Going East"),
- Direction::West => println!("Going West"),
- }
- }
- fn main() {
- println!("Hello, #Devcon");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement