iafisher / drill

Spaced-repetition quizzes on the command line
MIT License
2 stars 0 forks source link

Try harder to use enum for Question type #28

Closed iafisher closed 4 years ago

iafisher commented 4 years ago

It would simplify the logic of the code greatly even if it makes (de)serialization more complicated.

iafisher commented 4 years ago

I can do this using the [serde(tag = "kind")] annotation on the Question enum!

iafisher commented 4 years ago

I think a Question trait is actually a better idea than an enum.