mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
fix(usage): fixes a big regression with custom usage strings
This commit is contained in:
parent
cc1985b6d8
commit
a442211b39
2 changed files with 2 additions and 2 deletions
|
@ -691,7 +691,7 @@ impl<'a> Help<'a> {
|
|||
try!(write!(self.writer,
|
||||
"\n{}{}\n\n",
|
||||
TAB,
|
||||
usage::create_help_usage(parser, true)));
|
||||
usage::create_usage_no_title(parser, &[])));
|
||||
|
||||
let flags = parser.has_flags();
|
||||
let pos = parser.has_positionals();
|
||||
|
|
|
@ -43,7 +43,7 @@ pub fn create_error_usage<'a, 'b>(p: &Parser<'a, 'b>,
|
|||
}
|
||||
|
||||
// Creates a usage string (*without title*) if one was not provided by the user manually.
|
||||
fn create_usage_no_title(p: &Parser, used: &[&str]) -> String {
|
||||
pub fn create_usage_no_title(p: &Parser, used: &[&str]) -> String {
|
||||
debugln!("usage::create_usage_no_title;");
|
||||
if let Some(u) = p.meta.usage_str {
|
||||
String::from(&*u)
|
||||
|
|
Loading…
Reference in a new issue