summaryrefslogtreecommitdiffstats
path: root/src/paint.rs
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2019-07-17 23:03:04 -0400
committerDan Davison <dandavison7@gmail.com>2019-07-18 00:12:45 -0400
commit62fb930313675f83a010b8a20a4f48cf7a05615b (patch)
tree0b3ea324e222bf4d010265d0f662863a848a7b43 /src/paint.rs
parente9af9c85d5c2633023bb98253f5b8bb36a8f041b (diff)
Clean up: move tests, change variable name
Diffstat (limited to 'src/paint.rs')
-rw-r--r--src/paint.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/paint.rs b/src/paint.rs
index 249ed98f..8fc4c011 100644
--- a/src/paint.rs
+++ b/src/paint.rs
@@ -59,7 +59,7 @@ impl<'a> Painter<'a> {
syntax_style_sections.iter().zip(diff_style_sections)
{
for (style, text) in superimpose_style_sections(syntax_sections, diff_sections) {
- paint_section(&text, style, output_buffer).unwrap();
+ paint_text(&text, style, output_buffer).unwrap();
}
}
}
@@ -152,8 +152,8 @@ impl<'a> Painter<'a> {
}
}
-/// Write section text to buffer with color escape codes.
-fn paint_section(text: &str, style: Style, output_buffer: &mut String) -> std::fmt::Result {
+/// Write text to buffer with color escape codes.
+fn paint_text(text: &str, style: Style, output_buffer: &mut String) -> std::fmt::Result {
use std::fmt::Write;
match style.background {
style::NO_COLOR => (),