-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(macros): arg_enum! and simple_enum! provide a Vec<&str> of varia…
…nt names You can now use ArgName::variants() to get a Vec<&'static str> of vairant names (Nice for Arg::possible_values()). It's not as good as implementing Iterator for the enum, but that can't be done without being able to concat AST tokens in order to make an "EnumIter" type which implements iterator and keeps track of when to yield None. But the overall intent of this issue was to be able to iterate variant names, which is now possible. Closes #119
- Loading branch information
Showing
1 changed file
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters