Skip to content

refactor(cli): migrate from structopt to clap-derive#120

Merged
max-niederman merged 2 commits intomax-niederman:mainfrom
tranzystorekk:clap-derive
Apr 27, 2024
Merged

refactor(cli): migrate from structopt to clap-derive#120
max-niederman merged 2 commits intomax-niederman:mainfrom
tranzystorekk:clap-derive

Conversation

@tranzystorekk
Copy link
Copy Markdown
Contributor

structopt is quite old and unmaintained, and porting its code to pure clap-derive is straightforward for this codebase.

Hope this proves useful, but here are some additional notes:

  • I added value names to options that seem more appropriate to me
  • I wanted to use the new value_parser mechanism provided by clap, but that required adjusting the type of words to u32 and casting it later to usize, as clap doesn't support *size types here.

Copy link
Copy Markdown
Owner

@max-niederman max-niederman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, looks great!

@max-niederman max-niederman merged commit ad237e1 into max-niederman:main Apr 27, 2024
@tranzystorekk tranzystorekk deleted the clap-derive branch April 27, 2024 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants