Instead of manually implementing Default trait for an enum, you can derive it and explicitly tell which variant should be the default one.
1
2
3
4
5
6
7
8
9
#[derive(Default)]
enum Car{
#[default]
Porsche,
Ferrari,
Skoda
}
let car = Car::default();