Function difft::diff::unchanged::split_mostly_unchanged_toplevel
source · fn split_mostly_unchanged_toplevel<'a>(
lhs_nodes: &[&'a Syntax<'a>],
rhs_nodes: &[&'a Syntax<'a>]
) -> Vec<(Vec<&'a Syntax<'a>>, Vec<&'a Syntax<'a>>)>
Expand description
Split out top-level lists that are largely the same.
This is important in cases where we have two adjacent lists that have a small number of changes.
; old
(1 2 3 4) (a b c d)
; new
(1 2 novel 3 4) (a b novel-2 c d)
By splitting out these mostly-unchanged lists, we can substantially further shrink them.