Skip to main content

compute_diff

Function compute_diff 

Source
pub fn compute_diff(
    old: &[SnapshotElement],
    new: &[SnapshotElement],
) -> DiffResult
Expand description

Compare two snapshot element lists and return added, removed, and changed entries.

Match elements by (role, name, depth). For duplicate keys, match by position order within the group. Unmatched old → removed, unmatched new → added.