From 7cf08e63cd75d6b336493d5828260b7827154e10 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 18 Apr 2023 14:56:36 -0500 Subject: [PATCH] refactor(help): Remove unused hint --- clap_builder/src/builder/styled_str.rs | 5 ----- clap_builder/src/macros.rs | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/clap_builder/src/builder/styled_str.rs b/clap_builder/src/builder/styled_str.rs index 4d277815801..e9b56fb4c17 100644 --- a/clap_builder/src/builder/styled_str.rs +++ b/clap_builder/src/builder/styled_str.rs @@ -215,9 +215,6 @@ pub struct Styles { pub warning: anstyle::Style, /// Error heading pub error: anstyle::Style, - /// Extra details - #[allow(dead_code)] - pub hint: anstyle::Style, } impl Styles { @@ -230,7 +227,6 @@ impl Styles { good: anstyle::Style::new(), warning: anstyle::Style::new(), error: anstyle::Style::new(), - hint: anstyle::Style::new(), } } @@ -249,7 +245,6 @@ impl Styles { error: anstyle::Style::new() .fg_color(Some(anstyle::Color::Ansi(anstyle::AnsiColor::Red))) .bold(), - hint: anstyle::Style::new().dimmed(), } } #[cfg(not(feature = "color"))] diff --git a/clap_builder/src/macros.rs b/clap_builder/src/macros.rs index 7f001a93f6d..59135e21252 100644 --- a/clap_builder/src/macros.rs +++ b/clap_builder/src/macros.rs @@ -629,8 +629,7 @@ macro_rules! impl_settings { macro_rules! debug { ($($arg:tt)*) => ({ use std::fmt::Write as _; - let styles = $crate::builder::Styles::styled(); - let hint = &styles.hint; + let hint = anstyle::Style::new().dimmed(); let module_path = module_path!(); let body = format!($($arg)*);