Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

tranzystorekk
Copy link
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.

src/main.rs Outdated Show resolved Hide resolved
Copy link
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
3 checks passed
@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