summaryrefslogtreecommitdiffstats
path: root/src/path/mod.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-10-02 20:05:18 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-10-02 20:32:40 +0200
commitc55b6493a88853ac4db4360f15c781f3ae49d62b (patch)
tree164d0f50adeb5222a41b0cfd10223170227293ef /src/path/mod.rs
parentef7188f016f8a1a90b4c062816f1715e7afab592 (diff)
Fix clippy: variable does not need to be passed as &mut
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/path/mod.rs')
-rw-r--r--src/path/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/path/mod.rs b/src/path/mod.rs
index cd7ccd7..24a6325 100644
--- a/src/path/mod.rs
+++ b/src/path/mod.rs
@@ -193,7 +193,7 @@ impl Expression {
match value.kind {
ValueKind::Table(ref incoming_map) => {
// Pull out another table
- let mut target = if let ValueKind::Table(ref mut map) = root.kind {
+ let target = if let ValueKind::Table(ref mut map) = root.kind {
map.entry(id.clone())
.or_insert_with(|| Map::<String, Value>::new().into())
} else {
@@ -202,7 +202,7 @@ impl Expression {
// Continue the deep merge
for (key, val) in incoming_map {
- Expression::Identifier(key.clone()).set(&mut target, val.clone());
+ Expression::Identifier(key.clone()).set(target, val.clone());
}
}