summaryrefslogtreecommitdiffstats
path: root/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs
index 46dc47f..daeb081 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -136,7 +136,7 @@ impl ConfigError {
#[must_use]
fn prepend(self, segment: &str, add_dot: bool) -> Self {
let concat = |key: Option<String>| {
- let key = key.unwrap_or_else(String::new);
+ let key = key.unwrap_or_default();
let dot = if add_dot && key.as_bytes().get(0).unwrap_or(&b'[') != &b'[' {
"."
} else {