my fork of dmp
Diffstat (limited to 'src/dmp.rs')
-rw-r--r--src/dmp.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/dmp.rs b/src/dmp.rs
index 614c6fd..5a71b61 100644
--- a/src/dmp.rs
+++ b/src/dmp.rs
@@ -474,10 +474,6 @@ impl DiffMatchPatch {
Self::cleanup_semantic(&mut diffs);
// Rediff any replacement blocks, this time character-by-character.
-
- // Add a dummy entry at the end.
- // diffs.push(Diff::equal(&[]));
-
let mut pointer = 0_usize;
// count of bytes inserted
@@ -950,7 +946,7 @@ impl DiffMatchPatch {
) -> Option<HalfMatch<'a, T>> {
// Start with a 1/4 length substring at position i as a seed.
let seed = {
- let end = idx + (long.len() >> 2);
+ let end = idx + (long.len() / 4);
if idx < long.len() && end < long.len() {
&long[idx..end]
} else {