Skip to content

Commit

Permalink
fix(usage): fixes a big regression with custom usage strings
Browse files Browse the repository at this point in the history
  • Loading branch information
kbknapp committed Mar 24, 2017
1 parent cc1985b commit 2c41cab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/app/usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2c41cab

Please sign in to comment.