google / google/argh

Support declaring enum subcommands with named fields?

Open
#103 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
102
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.