Restore details to doc comment for help_template.

This commit is contained in:
Matt Kantor 2020-08-14 09:27:42 -07:00
parent afcacb0626
commit 2c91800099

View file

@ -732,8 +732,9 @@ impl<'help> App<'help> {
/// * `{version}` - Version number. /// * `{version}` - Version number.
/// * `{author}` - Author information. /// * `{author}` - Author information.
/// * `{author-with-newline}` - Author followed by `\n`. /// * `{author-with-newline}` - Author followed by `\n`.
/// * `{about}` - Description of the program. /// * `{about}` - General description (from [`App::about`] or
/// * `{about-with-newline}` - Description followed by `\n`. /// [`App::long_about`]).
/// * `{about-with-newline}` - About followed by `\n`.
/// * `{usage}` - Automatically generated or given usage string. /// * `{usage}` - Automatically generated or given usage string.
/// * `{all-args}` - Help for all arguments (options, flags, positional /// * `{all-args}` - Help for all arguments (options, flags, positional
/// arguments, and subcommands) including titles. /// arguments, and subcommands) including titles.
@ -744,8 +745,8 @@ impl<'help> App<'help> {
/// * `{options}` - Help for options. /// * `{options}` - Help for options.
/// * `{positionals}` - Help for positional arguments. /// * `{positionals}` - Help for positional arguments.
/// * `{subcommands}` - Help for subcommands. /// * `{subcommands}` - Help for subcommands.
/// * `{after-help}` - Info to be displayed after the help message. /// * `{after-help}` - Help from [`App::after_help`] or [`App::after_long_help`].
/// * `{before-help}` - Info to be displayed before the help message. /// * `{before-help}` - Help from [`App::before_help`] or [`App::before_long_help`].
/// ///
/// # Examples /// # Examples
/// ///
@ -756,6 +757,12 @@ impl<'help> App<'help> {
/// .help_template("{bin} ({version}) - {usage}") /// .help_template("{bin} ({version}) - {usage}")
/// # ; /// # ;
/// ``` /// ```
/// [`App::about`]: ./struct.App.html#method.about
/// [`App::long_about`]: ./struct.App.html#method.long_about
/// [`App::after_help`]: ./struct.App.html#method.after_help
/// [`App::after_long_help`]: ./struct.App.html#method.after_long_help
/// [`App::before_help`]: ./struct.App.html#method.before_help
/// [`App::before_long_help`]: ./struct.App.html#method.before_long_help
/// [`AppSettings::UnifiedHelpMessage`]: ./enum.AppSettings.html#variant.UnifiedHelpMessage /// [`AppSettings::UnifiedHelpMessage`]: ./enum.AppSettings.html#variant.UnifiedHelpMessage
pub fn help_template<S: Into<&'help str>>(mut self, s: S) -> Self { pub fn help_template<S: Into<&'help str>>(mut self, s: S) -> Self {
self.template = Some(s.into()); self.template = Some(s.into());