summaryrefslogtreecommitdiffstats
path: root/src/paint.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-06-19 11:43:57 -0400
committerDan Davison <dandavison7@gmail.com>2020-06-19 11:44:41 -0400
commit1c4c4d75386a10b4b8c0c6f2476feab5926b56a6 (patch)
tree78fb8a1e38f4de1ba16a7a6278060b05723ec6fb /src/paint.rs
parentf0e6c833b37bbd015074da1a3707de2991b3052c (diff)
Refactor: add native style.paint() method
Diffstat (limited to 'src/paint.rs')
-rw-r--r--src/paint.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/paint.rs b/src/paint.rs
index 05bc714b..97ed4834 100644
--- a/src/paint.rs
+++ b/src/paint.rs
@@ -188,7 +188,7 @@ impl<'a> Painter<'a> {
.number_plus_format_style
.ansi_term_style
.paint(plus_before),
- config.number_plus_style.ansi_term_style.paint(plus_number),
+ config.number_plus_style.paint(plus_number),
config
.number_plus_format_style
.ansi_term_style
@@ -205,7 +205,7 @@ impl<'a> Painter<'a> {
) {
if !handled_prefix {
if prefix != "" {
- ansi_strings.push(section_style.ansi_term_style.paint(prefix));
+ ansi_strings.push(section_style.paint(prefix));
if text.len() > 0 {
text.remove(0);
}
@@ -213,14 +213,14 @@ impl<'a> Painter<'a> {
handled_prefix = true;
}
if !text.is_empty() {
- ansi_strings.push(section_style.ansi_term_style.paint(text));
+ ansi_strings.push(section_style.paint(text));
}
}
let right_fill_background_color = non_emph_style.has_background_color()
&& background_color_extends_to_terminal_width
.unwrap_or(config.background_color_extends_to_terminal_width);
if right_fill_background_color {
- ansi_strings.push(non_emph_style.ansi_term_style.paint(""));
+ ansi_strings.push(non_emph_style.paint(""));
}
let line = &mut ansi_term::ANSIStrings(&ansi_strings).to_string();
if right_fill_background_color {