summaryrefslogtreecommitdiffstats
path: root/src/options
diff options
context:
space:
mode:
authorCatherine Noll <noll.catherine@gmail.com>2021-03-27 22:25:11 -0400
committerCatherine Noll <noll.catherine@gmail.com>2021-03-27 22:27:51 -0400
commit6dd4209e75252cb28563a618ec91285d97a07cd6 (patch)
treeba060df9911c66e811ec72bb1d974b024940803b /src/options
parent2e02bbec383d719a83c5a5193e7f8cd1e07cae12 (diff)
Remove unnecessary check in get_themes and clean up --show-themes cli docstring
Diffstat (limited to 'src/options')
-rw-r--r--src/options/get.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/options/get.rs b/src/options/get.rs
index a1bbecae..5752283a 100644
--- a/src/options/get.rs
+++ b/src/options/get.rs
@@ -49,14 +49,11 @@ pub fn get_themes(git_config: Option<git_config::GitConfig>) -> Vec<String> {
for e in &git_config.unwrap().config.entries(None).unwrap() {
let entry = e.unwrap();
let entry_name = entry.name().unwrap();
- let entry_value = entry.value().unwrap();
- if entry_value == "true" {
- let caps = GIT_CONFIG_THEME_REGEX.captures(entry_name);
- if let Some(caps) = caps {
- let name = caps.get(1).map_or("", |m| m.as_str()).to_string();
- if !themes.contains(&name) {
- themes.push(name)
- }
+ let caps = GIT_CONFIG_THEME_REGEX.captures(entry_name);
+ if let Some(caps) = caps {
+ let name = caps.get(1).map_or("", |m| m.as_str()).to_string();
+ if !themes.contains(&name) {
+ themes.push(name)
}
}
}