difft::diff::unchanged

Function split_unchanged_toplevel

Source
fn split_unchanged_toplevel<'a>(
    lhs_nodes: &[&'a Syntax<'a>],
    rhs_nodes: &[&'a Syntax<'a>],
    size_threshold: u32,
) -> Vec<(ChangeState, Vec<&'a Syntax<'a>>, Vec<&'a Syntax<'a>>)>
Expand description

Walk lhs_nodes and rhs_nodes and run a longest-common-subsequence (traditional) diff on their toplevel content IDs.

For sufficiently large nodes that are equal by ID, mark them as unchanged. Return the nodes in-between for full tree diffing.