Skip to main content

compute_diff

Function compute_diff 

Source
pub fn compute_diff(
    old_content: &str,
    new_content: &str,
    file_path: &str,
) -> DiffResult
Expand description

Compute a unified diff between old and new content

§Arguments

  • old_content - The original file content
  • new_content - The new file content
  • file_path - Path to the file (used in diff headers)

§Returns

A DiffResult containing the unified diff string and metadata about changes