Skip to main content

generate_unified_patch

Function generate_unified_patch 

Source
pub fn generate_unified_patch(
    path: &str,
    old_content: &str,
    new_content: &str,
) -> String
Expand description

A unified-diff patch with 4 lines of context, file headers only (no timestamps). Mirrors generateUnifiedPatch (via the similar crate, which is the Rust equivalent of the npm diff package).