merge_leaf_replace

Function merge_leaf_replace 

Source
pub fn merge_leaf_replace(base: &Value, overlay: &Value) -> Value
Expand description

Leaf-replace deep merge of overlay onto base.

When both sides at a key are tables, recurse so only the differing leaves change (a nested path like shell.require_approval is replaced without disturbing its sibling keys). Otherwise the overlay value wins wholesale — this is what makes arrays replaced, never spliced and lets a profile change a value’s type. An empty-table overlay is a no-op (returns base unchanged).