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

add basic support for generic structs and enums #483

Merged
merged 9 commits into from
Jul 1, 2021

Conversation

njeffords
Copy link
Contributor

This PR provides (at least basic) support for generics when deriving StructOpt (issue #128). It's probably not the ideal final implementation, but from what I can see, it improves the situation and makes some use cases possible.

Copy link
Owner

@TeXitoi TeXitoi left a comment

Choose a reason for hiding this comment

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

Thanks!

It lacks a few things:

  • ChangeLog entry
  • Documentation
  • Maybe a relevant example
  • A test with no bound, and an ignore field
  • A test with a bound that is not StructOpt (FromStr seems a good candidat?)

structopt-derive/src/lib.rs Outdated Show resolved Hide resolved
structopt-derive/src/lib.rs Outdated Show resolved Hide resolved
@njeffords njeffords requested a review from TeXitoi June 24, 2021 16:30
@njeffords njeffords requested a review from TeXitoi July 1, 2021 01:13
@TeXitoi TeXitoi merged commit 4bdde69 into TeXitoi:master Jul 1, 2021
@TeXitoi
Copy link
Owner

TeXitoi commented Jul 1, 2021

Thanks!

@njeffords njeffords deleted the derive_generic branch July 1, 2021 22:12
@TeXitoi
Copy link
Owner

TeXitoi commented Jul 4, 2021

v0.3.22 published

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