Merge branch 'master' of https://github.com/DimaKudosh/difflib
This commit is contained in:
@@ -27,14 +27,14 @@ fn main() {
|
||||
let first_text = "one two three four".split(" ").collect::<Vec<&str>>();
|
||||
let second_text = "zero one tree four".split(" ").collect::<Vec<&str>>();
|
||||
let diff = difflib::unified_diff(&first_text, &second_text, "Original", "Current",
|
||||
"2005-01-26 23:30:50", "2010-04-02 10:20:52", 3, "");
|
||||
"2005-01-26 23:30:50", "2010-04-02 10:20:52", 3);
|
||||
for line in &diff {
|
||||
println!("{:?}", line);
|
||||
}
|
||||
|
||||
//context_diff
|
||||
let diff = difflib::context_diff(&first_text, &second_text, "Original", "Current",
|
||||
"2005-01-26 23:30:50", "2010-04-02 10:20:52", 3, "");
|
||||
"2005-01-26 23:30:50", "2010-04-02 10:20:52", 3);
|
||||
for line in &diff {
|
||||
println!("{:?}", line);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user