Skip to main content

generate_diff

Function generate_diff 

Source
pub fn generate_diff(
    base: &str,
    new: &str,
    path: &str,
) -> (String, Option<usize>)
Expand description

Generate a unified diff between two strings (line-based, 3 lines of context). Returns (diff_string, first_changed_line) where first_changed_line is 1-indexed in the new file.