diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-03-01 13:23:03 -0600 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-03-01 13:23:03 -0600 |
commit | 742855ecd9534479e1283ae79632274c0dd564cb (patch) | |
tree | 7752a4de43fc28a0a157e05f046273ba312d6f9e | |
parent | 655af49cb978d3b0d2fd0358c111f7434e9e60ab (diff) |
Change function name
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index f2c29b5e..fea30115 100644 --- a/src/main.rs +++ b/src/main.rs @@ -82,14 +82,16 @@ fn show_background_colors(config: &config::Config) { --minus-emph-color=\"{minus_emph_color}\" \ --plus-color=\"{plus_color}\" \ --plus-emph-color=\"{plus_emph_color}\"", - minus_color = color_to_hex(config.minus_style_modifier.background.unwrap()), - minus_emph_color = color_to_hex(config.minus_emph_style_modifier.background.unwrap()), - plus_color = color_to_hex(config.plus_style_modifier.background.unwrap()), - plus_emph_color = color_to_hex(config.plus_emph_style_modifier.background.unwrap()), + minus_color = get_painted_rgb_string(config.minus_style_modifier.background.unwrap()), + minus_emph_color = + get_painted_rgb_string(config.minus_emph_style_modifier.background.unwrap()), + plus_color = get_painted_rgb_string(config.plus_style_modifier.background.unwrap()), + plus_emph_color = + get_painted_rgb_string(config.plus_emph_style_modifier.background.unwrap()), ) } -fn color_to_hex(color: Color) -> String { +fn get_painted_rgb_string(color: Color) -> String { let mut string = String::new(); let style = Style { foreground: style::NO_COLOR, |