Skip to main content

diff

Function diff 

Source
pub fn diff(old: &str, new: &str, granularity: Granularity) -> Vec<DiffHunk>
Expand description

Diff old against new at granularity. Adjacent hunks of the same kind are coalesced. At word granularity, changed regions separated by at most two equal tokens are coalesced to avoid noisy mid-word markup.