-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Consider this example:
fn main() {
let input = r#"
Foo
Bar
Baz
Bam
Meh
"#;
let output = r#"
Foo
Bar
Baz
Bam
Meh"#;
let changeset = Changeset::new(input, output, "\n");
println!("distance = {}", changeset.distance);
println!("{:#?}", changeset.diffs);
}It outputs this:
distance = 4
[
Same(
"Foo\nBar\n\nBaz\nBam\n\nMeh\n"
)
]
There is an inconsistency here, there is a distance of 4 yet the diff is only a single Same entry.
I would typically have expected the diff to be something like:
[
Same("Foo\nBar\n"),
Rem("\n"),
Same("Baz\n"),
Rem("\n"),
Same("Bam\n"),
Rem("\n"),
Same("Meh"),
Rem("\n")
]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels