Closed fitzgen closed 2 years ago
I suspect this is the same thing we are seeing with clap_derive
: https://github.com/clap-rs/clap/issues/2983
Looked a little closer. This is similar to https://github.com/clap-rs/clap/issues/2983 in that you are overriding about
but not overriding long_about
while your doc comment is setting both. You'll see this dual nature by passing -h
instead of --help
.
The way to resolve this is to also set long_about
.
Summary
The section for help/about text in the crate-level docs say
but that behavior is not exhibited when the doc comment has multiple lines.
Test Case
.tar.gz
bundle with full source,Cargo.toml
, andCargo.lock
Steps to Reproduce
Untar the test case,
cd
into it, and runExpected Results
The about text should be
Actual Results
The about text reads
Misc.
If the doc comment is trimmed to a single line, e.g. just
/// Doc comment.
, then the raw about method takes priority again.Tested with
structopt
version0.3.25
.