You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
485 B

#![allow(dead_code)]
enum Status {
Rich,
Poor,
}
enum Work {
Civilian,
Soldier,
}
fn main() {
use crate::Status::{Poor, Rich};
use crate::Work::*;
let status = Poor;
let work = Civilian;
match status {
Rich => println!("The rich have lots of money!"),
Poor => println!("The poor have no money..."),
}
match work {
Civilian => println!("Civilians work!"),
Soldier => println!("Soldiers fight!"),
}
}