Merge pull request #3 from mark-summerfield/master
Made example compile
This commit is contained in:
@@ -27,14 +27,14 @@ fn main() {
|
|||||||
let first_text = "one two three four".split(" ").collect::<Vec<&str>>();
|
let first_text = "one two three four".split(" ").collect::<Vec<&str>>();
|
||||||
let second_text = "zero one tree 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",
|
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 {
|
for line in &diff {
|
||||||
println!("{:?}", line);
|
println!("{:?}", line);
|
||||||
}
|
}
|
||||||
|
|
||||||
//context_diff
|
//context_diff
|
||||||
let diff = difflib::context_diff(&first_text, &second_text, "Original", "Current",
|
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 {
|
for line in &diff {
|
||||||
println!("{:?}", line);
|
println!("{:?}", line);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user