You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cargo run -- --help
rust-test 0.1.0
USAGE:
rust-test --r-type <r-type>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--r-type <r-type>
The parameter long name --r-type should be --type, and the parameter value string r-type should be type. Basically the r# of the struct member ident should not contribute to the clap::Arg parameters.
(Can be worked around by setting #[structopt(long = "type", name = "type")] explicitly.)
The text was updated successfully, but these errors were encountered:
I put it as enhancement as this case was not documented, and the result, even if surprising, is not problematic. I agree that we can correct this without changing version.
Technically it would be a breaking change for anyone who was relying on the behavior, eg their scripts (and the scripts of their binary's users) that used --r-type would stop working. Though of course that's probably not very likely.
The parameter long name
--r-type
should be--type
, and the parameter value stringr-type
should betype
. Basically ther#
of the struct member ident should not contribute to theclap::Arg
parameters.(Can be worked around by setting
#[structopt(long = "type", name = "type")]
explicitly.)The text was updated successfully, but these errors were encountered: