diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-04-11 15:47:28 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-04-11 15:47:28 -0400 |
commit | 7a23a5c536616f860e73226f220ec3a24b8aa6a3 (patch) | |
tree | 6df789d5b262c8e634e8c1017d0b6fd76a125c94 /src/paint.rs | |
parent | 8e97fdab8782e4056b5bda0391bdf00c74c8a429 (diff) |
Refactor: change order of arguments
Diffstat (limited to 'src/paint.rs')
-rw-r--r-- | src/paint.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/paint.rs b/src/paint.rs index 4d7ec822..d3c6806c 100644 --- a/src/paint.rs +++ b/src/paint.rs @@ -73,9 +73,9 @@ impl<'a> Painter<'a> { // TODO: lines and style sections contain identical line text if !self.minus_lines.is_empty() { Painter::paint_lines( - &mut self.output_buffer, minus_line_syntax_style_sections, minus_line_diff_style_sections, + &mut self.output_buffer, self.config, self.config.minus_style_modifier, true, @@ -83,9 +83,9 @@ impl<'a> Painter<'a> { } if !self.plus_lines.is_empty() { Painter::paint_lines( - &mut self.output_buffer, plus_line_syntax_style_sections, plus_line_diff_style_sections, + &mut self.output_buffer, self.config, self.config.plus_style_modifier, true, @@ -98,9 +98,9 @@ impl<'a> Painter<'a> { /// Superimpose background styles and foreground syntax /// highlighting styles, and write colored lines to output buffer. pub fn paint_lines( - output_buffer: &mut String, syntax_style_sections: Vec<Vec<(Style, &str)>>, diff_style_sections: Vec<Vec<(StyleModifier, &str)>>, + output_buffer: &mut String, config: &config::Config, background_style_modifier: StyleModifier, should_trim_newline_and_right_pad: bool, |