Match Maker
Choose enum variants and match arms to handle different states.
Challenge 1 of 3Score 0 / 3
Choose a fan state that prints Speed: low.
main.rs
enum Fan {
Off,
Low,
High,
}
fn main() {
match /* choose below */ {
Fan::Off => println!("Fan off"),
Fan::Low => println!("Speed: low"),
Fan::High => println!("Speed: high"),
}
}
Find the arm with the requested message and look at the pattern before its arrow.