Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Fix the Match

Oh no! This program won't compile because the match is not exhaustive -- it's missing a variant!

Look at the enum and figure out which variant is missing from the match. Add the missing arm so the program compiles and runs correctly.

Hint: Rust requires you to handle every single variant in a match. Check which Season is not covered!

rust
enum Season {
Spring,
Summer,
Autumn,
Winter,
}

fn main() {
let now = Season::Spring;

match now {
Season::Spring => println!("Flowers blooming!"),
Season::Summer => println!("Time for the beach!"),
Season::Winter => println!("Bundle up!"),
}
}