pub fn compute_diff_chunks<'a>(old: &'a str, new: &'a str) -> Vec<Chunk<'a>>Expand description
Computes a character-level diff with adjacent chunks coalesced.
ยงContract
- Requires:
oldandneware valid UTF-8&str(enforced by the type). - Ensures: every returned
Chunkborrows a char-boundary slice of its side, and concatenating Equal+Delete reconstructsoldwhile Equal+Insert reconstructsnew. - Termination: iterates
similarchanges once (variant: remaining changes).