add diffy, prettydiff

This commit is contained in:
2020-07-04 01:09:01 +08:00
parent 1ec2a1c20c
commit 90f93df98a
6 changed files with 527 additions and 0 deletions

15
prettydiff/src/main.rs Normal file
View File

@@ -0,0 +1,15 @@
use prettydiff::diff_slice;
// https://github.com/romankoblov/prettydiff
fn main() {
println!("Diff: {}", diff_slice(&[1, 2, 3, 4, 5, 6], &[2, 3, 5, 7]));
println!(
"Diff: {}",
diff_slice(&["q", "a", "b", "x", "c", "d"], &["a", "b", "y", "c", "d", "f"])
);
println!(
"Diff: {}",
diff_slice(&["a", "c", "d", "b"], &["a", "e", "b"])
);
}