Skip to main content

unified_diff

Function unified_diff 

Source
pub fn unified_diff(
    old_label: &str,
    new_label: &str,
    old: &str,
    new: &str,
) -> String
Expand description

Render a unified diff between two texts: git-compatible headers, three context lines, \ No newline at end of file markers. Lines are compared with their terminators, so a missing final newline diffs correctly. Deterministic — a pure function of its inputs.