DEV Community

Discussion on: Getting started with Rust: Enum on steroids!

Collapse
 
hgisinger profile image
Hernando Gisinger

Great post

Same function in all cases?

DogKind::Doggo => take_care_of_doggo(),
DogKind::Doge => take_care_of_doggo(),
DogKind::Pupper => take_care_of_doggo(),

Collapse
 
mnivoliez profile image
mnivoliez

Seems like I made a little mistake. Thanks for the hint. Let me correct that!