Compute the diff between two sequences of lines. This is the main entry point for diffing. It takes two slices of [`Line`]s and returns a [`DiffResult`] containing the operations needed to transform the old sequence into the new one. # Arguments `old` - The original sequence of lines `new` - The modified sequence of lines `algorithm` - Which diff algorithm to use # Returns A [`DiffResult`] co
(old: &[Line<'a>], new: &[Line<'a>], algorithm: Algorithm)
| 170 | /// assert!(!result.is_empty()); |
| 171 | /// ``` |
| 172 | pub fn diff<'a>(old: &[Line<'a>], new: &[Line<'a>], algorithm: Algorithm) -> DiffResult { |
| 173 | diff_with_options(old, new, algorithm, true) |
| 174 | } |
| 175 | |
| 176 | /// Like [`diff`] but skips the heuristic that converts positional shifts |
| 177 | /// into `Replace` operations. |