pub fn generate_unified_diff(
path: &Path,
original: &str,
modified: &str,
context_lines: usize,
) -> (String, DiffStats)Expand description
Generate a unified diff between original and modified content
Returns the unified diff string and statistics about the changes.
ยงArguments
path- The file path (used in diff headers)original- The original file contentmodified- The modified file contentcontext_lines- Number of context lines to show (default is 3)