Skip to content

Commit 5ca3b2f

Browse files
committed
refactor(help): Shrink binary size
1 parent ec7040e commit 5ca3b2f

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

clap_builder/src/builder/styled_str.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -303,44 +303,44 @@ impl Styles {
303303
impl Styles {
304304
/// General Heading style, e.g. [`help_heading`][crate::Arg::help_heading]
305305
#[inline(always)]
306-
pub const fn get_header(&self) -> anstyle::Style {
307-
self.header
306+
pub const fn get_header(&self) -> &anstyle::Style {
307+
&self.header
308308
}
309309

310310
/// Error heading
311311
#[inline(always)]
312-
pub const fn get_error(&self) -> anstyle::Style {
313-
self.error
312+
pub const fn get_error(&self) -> &anstyle::Style {
313+
&self.error
314314
}
315315

316316
/// Usage heading
317317
#[inline(always)]
318-
pub const fn get_usage(&self) -> anstyle::Style {
319-
self.usage
318+
pub const fn get_usage(&self) -> &anstyle::Style {
319+
&self.usage
320320
}
321321

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

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

334334
/// Highlight suggested usage
335335
#[inline(always)]
336-
pub const fn get_valid(&self) -> anstyle::Style {
337-
self.valid
336+
pub const fn get_valid(&self) -> &anstyle::Style {
337+
&self.valid
338338
}
339339

340340
/// Highlight invalid usage
341341
#[inline(always)]
342-
pub const fn get_invalid(&self) -> anstyle::Style {
343-
self.invalid
342+
pub const fn get_invalid(&self) -> &anstyle::Style {
343+
&self.invalid
344344
}
345345
}
346346

0 commit comments

Comments
 (0)