Replies: 1 comment
-
There is not a clap feature to help with this. There is also not much clap can do. We'd need to auto-detect the type of value parser being used by textually analyzing the attribute and guess what bounds it needs. That is not a practical thing to do. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a list of subcommands, each for a different compression algorithm that accept a different type of level.
I was expecting something like this to work:
However, lots of bounds are required to be explicit in order for the build to succeed, and annoyingly, they come up one at a time in rustc's error messages, so it takes a lot of trial and error to figure out.
I can see most people giving up this approach. I did the first time. Also, without a way to alias all of these bounds the code is pretty ugly.
This is the usage site and it would ideally remain the same, but it could change if it helps avoid breaking changes:
If it makes sense, I could submit a PR.
Beta Was this translation helpful? Give feedback.
All reactions