Closed noeddl closed 3 years ago
The extra #[doc = $name] is important because it tells the user what to use when referring to the color in a string literal. For example, the color CHERRY_RED needs to be referred to as "cherry red" when calling set_pen_color. I'm planning to rework things so this is more clear.
I see, that makes sense.
Thanks for merging!
Fixes #171.
Some notes:
COLORS
andCOLOR_NAMES
with the functionsall_colors
andall_color_names
, respectively. If we keep theextended
(nowextra_colors
module) we should probably do the same thing there so that it's consistent? (In any case, the documentation should be updated to refer to the functions instead of the static variables.)#[doc = $name]
incolor_consts!
as this does not provide any more information about the respective constant (other than repeating the name of the color it refers to). This would safe some of the space that the constants take up in the docs.