summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/git_config/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/git_config/mod.rs b/src/git_config/mod.rs
index a5335659..9e3ee676 100644
--- a/src/git_config/mod.rs
+++ b/src/git_config/mod.rs
@@ -82,7 +82,7 @@ fn parse_config_from_env_var() -> HashMap<String, String> {
fn parse_config_from_env_var_value(s: &str) -> HashMap<String, String> {
ConfigParametersIter::new(s)
.filter(|(k, _)| k.starts_with("delta."))
- .map(|(k, v)| (k.to_string(), v.unwrap_or(Cow::Borrowed("")).to_string()))
+ .map(|(k, v)| (k.into_owned(), v.map(Cow::into_owned).unwrap_or_default()))
.collect()
}