I have a simple program:
use structopt::StructOpt;
/// The main thing
#[derive(StructOpt)]
struct Main {
#[structopt(subcommand)]
subcommand: Subcommand,
}
/// The subcommand
#[derive(StructOpt)]
enum Subcommand {
A{}
}
fn main() {
Main::from_args();
}
When I run it with cargo run -- --help, I get the following output:
poligon 0.1.0
The subcommand
USAGE:
poligon <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
a
help Prints this message or the help of the given subcommand(s)
The app description should be The main thing, not The subcommand!
I have a simple program:
When I run it with
cargo run -- --help, I get the following output:The app description should be
The main thing, notThe subcommand!