-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Description
Hey there!
I just went through the enums1.rs
exercise, and I found the instructions a little confusing at first.
The comment says:
// TODO: Define a few types of messages as used below.
But in the main() function, you see things like Message::Resize, Message::Move, etc.
and that kind of looks like those variants might take values (especially after doing the structs exercises).
So I initially tried adding values or thinking I had to pass in data like Message::Resize(800, 600).
Turns out, all of those variants are meant to be value-less, which is super simple once you know — but it wasn’t totally obvious from the comment.
Suggestion: maybe make the comment a bit more explicit, like:
// TODO: Define the message types used below.
// These are simple enum variants with no data.
Small change, but I think it might help people avoid overthinking the task.
Thanks for this awesome project!