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

ValueEnum fallback #5886

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

ModProg
Copy link
Contributor

@ModProg ModProg commented Jan 20, 2025

Would fix #5885 if EnumValueParser were actually using ValueEnum::from_str instead of apparently shipping it's own implementation here: https://docs.rs/clap_builder/4.5.26/src/clap_builder/builder/value_parser.rs.html#1119-1135 not sure what the best remedy is... supporting fallback explicitly in the ValueEnum trait? or making EnumValueParser respect ValueEnum::from_str.

@ModProg ModProg force-pushed the value-enum-fallback branch from 955dabc to 993bc8f Compare January 20, 2025 11:54
@ModProg ModProg force-pushed the value-enum-fallback branch from 993bc8f to c567f0c Compare January 20, 2025 12:13
@epage epage marked this pull request as draft January 20, 2025 14:26
@epage
Copy link
Member

epage commented Jan 20, 2025

Note that we ask for the focus to be on Issues until a design is settled before PRs. As such, I've marked this as a Draft.

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.

Fallback for ValueEnum
2 participants