summaryrefslogtreecommitdiff
path: root/nitrokey-sys/libnitrokey-v3.5/libnitrokey
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-01-06 16:05:36 -0800
committerDaniel Mueller <deso@posteo.net>2019-01-06 16:05:36 -0800
commit350b3039ea0bc88c830bb3b4003af02b1000fd48 (patch)
treee99e9dc64bedc7a33fc1f9e9713fa0c673aa8fb3 /nitrokey-sys/libnitrokey-v3.5/libnitrokey
parent21a68c0cdd6237313a4cfad2de108b3785b75b49 (diff)
downloadnitrocli-350b3039ea0bc88c830bb3b4003af02b1000fd48.tar.gz
nitrocli-350b3039ea0bc88c830bb3b4003af02b1000fd48.tar.bz2
Auto generate argument enums
The argparse module we use for parsing events expects an enum in order to convey what subcommand has been supplied as an argument. Such an enum also needs to implement str::FromStr and, preferably, fmt::Display. Manually writing down those definitions is error-prone, tedious, and adds no value -- only lines of code. As it turns out the proper definitions can be generated with relative easy with a declarative macro, making the code much more concise. Hence, with this change we use a newly introduced macro for generating those enums.
Diffstat (limited to 'nitrokey-sys/libnitrokey-v3.5/libnitrokey')
0 files changed, 0 insertions, 0 deletions