Skip to content

Commit

Permalink
fix(commands): Fmt fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ychiguer committed Jun 27, 2022
1 parent b3ca282 commit 9fd1e72
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 6 additions & 12 deletions src/builder/command.rs
Expand Up @@ -725,14 +725,11 @@ impl<'help> App<'help> {
let mut c = Colorizer::new(Stream::Stdout, color);
let usage = Usage::new(self);
match Help::new(HelpWriter::Buffer(&mut c), self, &usage, false).write_help() {
Ok(_) => {
c.to_owned().to_string()
},
Ok(_) => c.to_owned().to_string(),
Err(e) => {
panic!("{}",e.to_string())
},
panic!("{}", e.to_string())
}
}

}

/// Returns the long help message.
Expand All @@ -752,14 +749,11 @@ impl<'help> App<'help> {
let mut c = Colorizer::new(Stream::Stdout, color);
let usage = Usage::new(self);
match Help::new(HelpWriter::Buffer(&mut c), self, &usage, true).write_help() {
Ok(_) => {
c.to_owned().to_string()
},
Ok(_) => c.to_owned().to_string(),
Err(e) => {
panic!("{}",e.to_string())
},
panic!("{}", e.to_string())
}
}

}

/// Prints the long help message (`--help`) to [`io::stdout()`].
Expand Down
2 changes: 1 addition & 1 deletion tests/builder/help.rs
Expand Up @@ -2936,4 +2936,4 @@ fn get_long_help_as_string() {
let cmd = &mut setup();
let help = cmd.get_long_help();
assert_eq!(help, SETUP_LONG_HELP_MESSAGE);
}
}

0 comments on commit 9fd1e72

Please sign in to comment.