blob: ca102e2054339adab0cb65aff05aa95afe7496e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
use similar::{capture_diff_slices, Algorithm};
fn main() {
let old = vec![1, 2, 3];
let new = vec![1, 2, 4];
let ops = capture_diff_slices(Algorithm::Myers, &old, &new);
for op in ops {
for change in op.iter_changes(&old, &new) {
println!("{:?}", change);
}
}
}
|