From 9afcb044fbf0036d27bc292e8face791eaa9abbd Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 18 Apr 2023 15:28:20 -0500 Subject: [PATCH] refactor(help): Shrink binary size --- clap_builder/src/builder/styled_str.rs | 28 +++++++++++++------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/clap_builder/src/builder/styled_str.rs b/clap_builder/src/builder/styled_str.rs index bae2dd08c2e7..83e055c96cf3 100644 --- a/clap_builder/src/builder/styled_str.rs +++ b/clap_builder/src/builder/styled_str.rs @@ -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 } }