summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-03-01 21:35:48 -0600
committerDan Davison <dandavison7@gmail.com>2020-03-01 21:35:48 -0600
commit9418424182bf768aad19847716e17fdebb4471b8 (patch)
tree8410e59317b9a74a9dd7660fe9395a2d97e95b40
parent1b38dff00bd6790f8d29e9c744fc2d01bd5d78b1 (diff)
Change a function name
-rw-r--r--src/config.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/config.rs b/src/config.rs
index 2a6590aa..5d5b114f 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -55,7 +55,7 @@ pub fn get_config<'a>(
};
let minus_style_modifier = StyleModifier {
- background: Some(color_from_arg(
+ background: Some(color_from_rgb_or_ansi_code_with_default(
opt.minus_color.as_ref(),
style::get_minus_color_default(is_light_mode, true_color),
)),
@@ -68,7 +68,7 @@ pub fn get_config<'a>(
};
let minus_emph_style_modifier = StyleModifier {
- background: Some(color_from_arg(
+ background: Some(color_from_rgb_or_ansi_code_with_default(
opt.minus_emph_color.as_ref(),
style::get_minus_emph_color_default(is_light_mode, true_color),
)),
@@ -81,7 +81,7 @@ pub fn get_config<'a>(
};
let plus_style_modifier = StyleModifier {
- background: Some(color_from_arg(
+ background: Some(color_from_rgb_or_ansi_code_with_default(
opt.plus_color.as_ref(),
style::get_plus_color_default(is_light_mode, true_color),
)),
@@ -90,7 +90,7 @@ pub fn get_config<'a>(
};
let plus_emph_style_modifier = StyleModifier {
- background: Some(color_from_arg(
+ background: Some(color_from_rgb_or_ansi_code_with_default(
opt.plus_emph_color.as_ref(),
style::get_plus_emph_color_default(is_light_mode, true_color),
)),
@@ -187,7 +187,7 @@ fn color_from_rgb_or_ansi_code(s: &str) -> Color {
}
}
-fn color_from_arg(arg: Option<&String>, default: Color) -> Color {
+fn color_from_rgb_or_ansi_code_with_default(arg: Option<&String>, default: Color) -> Color {
match arg {
Some(string) => color_from_rgb_or_ansi_code(&string),
None => default,