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

Support declaring enum subcommands with named fields? #103

Open
anp opened this issue Jul 27, 2021 · 0 comments
Open

Support declaring enum subcommands with named fields? #103

anp opened this issue Jul 27, 2021 · 0 comments

Comments

@anp
Copy link

anp commented Jul 27, 2021

https://fuchsia-review.googlesource.com/c/fuchsia/+/559693/4/src/developer/forensics/crasher/rust/src/main.rs#41 is an example where the current way to define subcommands ends up being quite verbose. I suspect there might be obstacles to generating code without a named type to attach to each variant, but if it's possible to support enums with inline fields it would be a lot more ergonomic for small/simple use cases.

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

No branches or pull requests

1 participant