Skip to main content

line_diff

Function line_diff 

Source
pub(crate) fn line_diff(from: &str, to: &str) -> String
Expand description

A minimal unified-diff-style line comparison: longest-common-subsequence based, output lines prefixed " " (context), "- " (removed, from only), or "+ " (added, to only). No @@ hunk headers or context trimming in v1 — every line is included, which is fine for memory files.