I'm migrating some tools from clap v2 to v3. In v2 there was method ArgMatches::usage(). For example the following code:
use clap::{App, Arg};
fn main() {
let m = App::new("myprog")
.arg(Arg::with_name("debug").short("d"))
.get_matches_from(vec!["myprog", "-d"]);
println!("{}", m.usage());
}
Prints
USAGE:
myprog [FLAGS]
The question is if there is a way to get the same functionality in clap v3.