Skip to content

Commit

Permalink
refactor(help): Shrink binary size
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Apr 18, 2023
1 parent a7cc959 commit 9afcb04
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions clap_builder/src/builder/styled_str.rs
Expand Up @@ -302,44 +302,44 @@ impl Styles {
/// Reflection
impl Styles {
#[inline(always)]
pub const fn get_header(&self) -> anstyle::Style {
self.header
pub const fn get_header(&self) -> &anstyle::Style {
&self.header
}

/// Error heading
#[inline(always)]
pub const fn get_error(&self) -> anstyle::Style {
self.error
pub const fn get_error(&self) -> &anstyle::Style {
&self.error
}

/// Usage heading
#[inline(always)]
pub const fn get_usage(&self) -> anstyle::Style {
self.usage
pub const fn get_usage(&self) -> &anstyle::Style {
&self.usage
}

/// Literal command-line syntax, e.g. `--help`
#[inline(always)]
pub const fn get_literal(&self) -> anstyle::Style {
self.literal
pub const fn get_literal(&self) -> &anstyle::Style {
&self.literal
}

/// Descriptions within command-line syntax, e.g. [`value_name`][crate::Arg::value_name]
#[inline(always)]
pub const fn get_placeholder(&self) -> anstyle::Style {
self.placeholder
pub const fn get_placeholder(&self) -> &anstyle::Style {
&self.placeholder
}

/// Highlight suggested usage
#[inline(always)]
pub const fn get_valid(&self) -> anstyle::Style {
self.valid
pub const fn get_valid(&self) -> &anstyle::Style {
&self.valid
}

/// Highlight invalid usage
#[inline(always)]
pub const fn get_invalid(&self) -> anstyle::Style {
self.invalid
pub const fn get_invalid(&self) -> &anstyle::Style {
&self.invalid
}
}

Expand Down

0 comments on commit 9afcb04

Please sign in to comment.