Skip to main content

diff_blobs

Function diff_blobs 

Source
pub fn diff_blobs(
    a: Option<&[u8]>,
    b: Option<&[u8]>,
    a_path: Option<&str>,
    b_path: Option<&str>,
    context_lines: usize,
) -> FileDiff
Expand description

Build a FileDiff from two byte slices. Detects binary content (null-byte heuristic, then utf-8 check) and surfaces it as a Binary status without trying to render lines.