Skip to main content

render_diff_patch

Function render_diff_patch 

Source
pub fn render_diff_patch(output: &DiffReport) -> String
Expand description

Lossy String view of the byte-exact patch (render_diff_patch_bytes), for the JSON .patch field and String-based callers/tests. Only a non-UTF-8 symlink target (Unix-only) differs from the byte render; JSON strings cannot carry raw bytes, so a lossy view is the best a String surface can do. The round-trip surface (heddle diff --patch) writes the bytes directly via render_diff_patch_bytes, so its byte fidelity is never reduced here.