aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Implement Default in the Enum! and Command! macrosRobin Krahl2020-01-07
| | | | | | | For the transition to structopt, we have to be able to easily construct enum variants once we have added fields to them. Therefore we implement the Default trait in the generated macros by choosing the first variant as the default.
* Allow adding fields to an enum variant in Command!Robin Krahl2020-01-07
| | | | | | To be able to use the enums generated by Command! with structopt, we have to be able to add fields to them. This patch adds a new variant to the Command! macro that supports fields.
* Factor out Enum! and Command! macros in arg_utilRobin Krahl2020-01-07
| | | | | For easier refactoring, we remove the internal enum_int! macro and instead copy its code to the Enum! and Command! macros.
* Use strings instead of Command variantsRobin Krahl2020-01-07
| | | | | | | | | In one of the next patches, we will add fields to some Command variants to be able to use them with structopt. Then we will no longer be able to instantiate them directly, so we replace these instances for the transition. This patch also removes the cmd_help! macro that is no longer needed.
* arg_util: Change Err type in FromStr implementationRobin Krahl2020-01-07
| | | | | structopt requires that FromStr::Err implements std::fmt::Display. Therefore we now return a String that contains a list of allowed values.
* Refactor the Enum! macro into Enum! and Command!Robin Krahl2020-01-07
| | | | | | For an easier transition to structopt, this patch splits the two cases of the Enum! macro into two separate macros (that internally both call the new enum_int! macro).
* Move nitrocli source code into repository rootDaniel Mueller2020-04-04
Now that all vendored dependencies have been removed, this change moves the program's source code from the nitrocli/ directory into the root of the repository.