mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-13 05:20:28 +08:00
fix(merge): optimize key handling in deep_merge function
This commit is contained in:
parent
4ee6402e29
commit
857392de8a
@ -7,7 +7,7 @@ fn deep_merge(a: &mut Value, b: Value) {
|
||||
match (a, b) {
|
||||
(&mut Value::Mapping(ref mut a), Value::Mapping(b)) => {
|
||||
for (k, v) in b {
|
||||
deep_merge(a.entry(k.clone()).or_insert(Value::Null), v);
|
||||
deep_merge(a.entry(k).or_insert(Value::Null), v);
|
||||
}
|
||||
}
|
||||
(a, b) => *a = b,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user