Skip to main content

count_changes_with_algorithm

Function count_changes_with_algorithm 

Source
pub fn count_changes_with_algorithm(
    old_content: &str,
    new_content: &str,
    algorithm: Algorithm,
) -> (usize, usize)
Expand description

Count insertions and deletions using the given line-diff algorithm.

Git’s --stat / --numstat follow the configured diff algorithm; this mirrors that by running similar::TextDiff with an explicit similar::Algorithm.