fn merge_into_mapping(
mapping: &Mapping,
target: &Mapping,
original: Option<&Mapping>,
remove_missing: bool,
) -> Result<()>Expand description
Recursively merge target into mapping, using original (the semantic
parse of the same subtree) to skip unchanged keys. remove_missing (true
only at the top level) drops keys absent from target.
Only the top level removes, because AppConfigV1’s #[serde(flatten)] extra
re-emits unknown top-level keys: a key missing from target there was cleared
on purpose (e.g. app_id/name on owner change). Nested sub-structs have no
such catch-all and drop fields they don’t model, so removing nested keys would
delete the user’s forward-compatible settings.