summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2022-06-19 17:41:21 +0200
committerGitHub <noreply@github.com>2022-06-19 17:41:21 +0200
commita2598c23084587d4d911e47bdf6e2a59ede589b3 (patch)
tree5f5da3d9a0b5eac0d82480bbf78025bce4a718b3
parentb532fc860c8b32c97ec8bdf49375355ea9234692 (diff)
parent8b2bdfe9a2fc7a6b30bf287f3066f47678996d63 (diff)
Merge pull request #347 from matthiasbeyer/fix-clippy
Fix clippy: use first() instead of get(0)
-rw-r--r--src/error.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs
index 7957d2f..3cb50e0 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -137,7 +137,7 @@ impl ConfigError {
fn prepend(self, segment: &str, add_dot: bool) -> Self {
let concat = |key: Option<String>| {
let key = key.unwrap_or_default();
- let dot = if add_dot && key.as_bytes().get(0).unwrap_or(&b'[') != &b'[' {
+ let dot = if add_dot && key.as_bytes().first().unwrap_or(&b'[') != &b'[' {
"."
} else {
""