summaryrefslogtreecommitdiffstats
path: root/vendor/clap_builder/src/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/clap_builder/src/macros.rs')
-rw-r--r--vendor/clap_builder/src/macros.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/clap_builder/src/macros.rs b/vendor/clap_builder/src/macros.rs
index 82a881198..59135e212 100644
--- a/vendor/clap_builder/src/macros.rs
+++ b/vendor/clap_builder/src/macros.rs
@@ -628,12 +628,13 @@ macro_rules! impl_settings {
#[cfg(feature = "debug")]
macro_rules! debug {
($($arg:tt)*) => ({
- let prefix = format!("[{:>w$}] \t", module_path!(), w = 28);
+ use std::fmt::Write as _;
+ let hint = anstyle::Style::new().dimmed();
+
+ let module_path = module_path!();
let body = format!($($arg)*);
let mut styled = $crate::builder::StyledStr::new();
- styled.hint(prefix);
- styled.hint(body);
- styled.none("\n");
+ let _ = write!(styled, "{}[{module_path:>28}]{body}{}\n", hint.render(), hint.render_reset());
let color = $crate::output::fmt::Colorizer::new($crate::output::fmt::Stream::Stderr, $crate::ColorChoice::Auto).with_content(styled);
let _ = color.print();
})