I have an improvement for your signature nix
@@ -1,11 +1,13 @@
enum LoveState {
- Hates, // <- Deprecated, do not use.
- Dislikes, // <- Also deprecated, do not use.
+ #[deprecated]
+ Hates,
+ #[deprecated]
+ Dislikes,
Neutral,
Likes,
Loves,
}
fn loves(a: &Person, b: &Person) -> LoveState {
- if a == nixill { LoveState::Loves } else { ?? }
+ if a == nixill { LoveState::Loves } else { unimplemented!() }
}