MCPcopy Create free account
hub / github.com/Moosync/Moosync / merge

Function merge

src-tauri/database/src/database.rs:1309–1325  ·  view source on GitHub ↗
(a: &mut Value, b: Value)

Source from the content-addressed store, hash-verified

1307
1308#[tracing::instrument(level = "debug", skip())]
1309fn merge(a: &mut Value, b: Value) {
1310 if let Value::Object(a) = a {
1311 if let Value::Object(b) = b {
1312 for (k, v) in b {
1313 if v.is_null() {
1314 a.remove(&k);
1315 } else {
1316 merge(a.entry(k).or_insert(Value::Null), v);
1317 }
1318 }
1319
1320 return;
1321 }
1322 }
1323
1324 *a = b;
1325}

Callers 1

merge_extra_infoMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected