From 08c4e83c3a581095a95ea5f6cfbc18b4e2a7fc4e Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sun, 20 Nov 2022 20:26:53 +0300 Subject: [PATCH] Rename BasicStyle to StyleImpl --- color/constants.v | 20 ++++++++++---------- color/style.v | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/color/constants.v b/color/constants.v index bd2032c..c928371 100644 --- a/color/constants.v +++ b/color/constants.v @@ -21,16 +21,16 @@ pub const ( bright_cyan = Color(BasicColor.bright_cyan) bright_white = Color(BasicColor.bright_white) // Styles - reset = Style(BasicStyle.reset) - bold = Style(BasicStyle.bold) - dim = Style(BasicStyle.dim) - italic = Style(BasicStyle.italic) - underline = Style(BasicStyle.underline) - slow_blink = Style(BasicStyle.slow_blink) - rapid_blink = Style(BasicStyle.rapid_blink) - inverse = Style(BasicStyle.inverse) - hidden = Style(BasicStyle.hidden) - strikethrough = Style(BasicStyle.strikethrough) + reset = Style(StyleImpl.reset) + bold = Style(StyleImpl.bold) + dim = Style(StyleImpl.dim) + italic = Style(StyleImpl.italic) + underline = Style(StyleImpl.underline) + slow_blink = Style(StyleImpl.slow_blink) + rapid_blink = Style(StyleImpl.rapid_blink) + inverse = Style(StyleImpl.inverse) + hidden = Style(StyleImpl.hidden) + strikethrough = Style(StyleImpl.strikethrough) ) const no_color = !term.can_show_color_on_stdout() diff --git a/color/style.v b/color/style.v index 891fe37..7958928 100644 --- a/color/style.v +++ b/color/style.v @@ -18,7 +18,7 @@ pub fn (s Style) cprintln(msg string) { // Implementation -enum BasicStyle { +enum StyleImpl { reset bold dim @@ -31,7 +31,7 @@ enum BasicStyle { strikethrough } -pub fn (s BasicStyle) render(msg string) string { +pub fn (s StyleImpl) render(msg string) string { return if no_color { msg } else {