Closed julianandrews closed 4 years ago
On further evaluation, I'm not finding a solution that's elegant enough to be worth doing.
I could use the strum
or enum_derive
crate to shear off some of the boilerplate, but I don't feel like the dependency is necessary worth the gain since neither would get rid of all the repetition anyway.
Right now there's a ton of boilerplate going through all the enum values and doing largely the same thing. Some clever use of macros could probably remove hundreds of lines of code, and make the system less error-prone.