diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-12-12 15:45:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 23:45:45 +0900 |
commit | ece78cfb8a9f641b67eaa350bb5344c8bec301bd (patch) | |
tree | 09e1c2110321f5e7222c0f70e142b8b157da6af2 /runtime/colors.rs | |
parent | 06c5f99a01698feba4ce67fa911428cf2d8c95d4 (diff) |
refactor: nicer warning display (#21547)
Diffstat (limited to 'runtime/colors.rs')
-rw-r--r-- | runtime/colors.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/colors.rs b/runtime/colors.rs index 8d915b571..8790eccd1 100644 --- a/runtime/colors.rs +++ b/runtime/colors.rs @@ -108,6 +108,13 @@ pub fn cyan<S: AsRef<str>>(s: S) -> impl fmt::Display { style_spec.set_fg(Some(Cyan)); style(s, style_spec) } + +pub fn cyan_with_underline<S: AsRef<str>>(s: S) -> impl fmt::Display { + let mut style_spec = ColorSpec::new(); + style_spec.set_fg(Some(Cyan)).set_underline(true); + style(s, style_spec) +} + pub fn cyan_bold<S: AsRef<str>>(s: S) -> impl fmt::Display { let mut style_spec = ColorSpec::new(); style_spec.set_fg(Some(Cyan)).set_bold(true); |