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

feat(derive): Don't require Display for default ArgEnum #3188

Merged
merged 2 commits into from Dec 16, 2021

Conversation

epage
Copy link
Member

@epage epage commented Dec 16, 2021

While I'm unsure how much type specialization we should do, we
intentionally have the arg_enum attribute for doing special behavior
based on it, so let's take advantage of it.

By loosening PossibleValues lifetimes for this, we also avoid a lazy_static! and string allocation.

Fixes #3185

While I'm unsure how much type specialization we should do, we
intentionally have the `arg_enum` attribute for doing special behavior
based on it, so let's take advantage of it.

Fixes clap-rs#3185
@epage epage merged commit b9a9a80 into clap-rs:master Dec 16, 2021
@epage epage deleted the default branch December 16, 2021 15:31
@danieleades
Copy link
Contributor

that was quick

@epage
Copy link
Member Author

epage commented Dec 16, 2021

v3.0.0-rc.6 is released with it

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.

use default_value_t with ArgEnum without manually implementing Display
2 participants