add diffy, prettydiff
This commit is contained in:
16
diffy/src/main.rs
Normal file
16
diffy/src/main.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use diffy::PatchFormatter;
|
||||
|
||||
const A: &str = r##"
|
||||
hello world
|
||||
hatter
|
||||
"##;
|
||||
const B: &str = r##"
|
||||
hello world
|
||||
hatterj
|
||||
"##;
|
||||
|
||||
fn main() {
|
||||
let patch = diffy::create_patch(A, B);
|
||||
let f = PatchFormatter::new().with_color();
|
||||
print!("{}", f.fmt_patch(&patch));
|
||||
}
|
||||
Reference in New Issue
Block a user