Added deadlines to all algorithms (#18)

This adds a deadline to all algorithms which lets one bail in a fixed amount of
time to avoid pathological cases.
This commit is contained in:
Armin Ronacher 2021-02-20 10:12:06 +01:00 committed by GitHub
parent 99386e8106
commit 74e2805a95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 412 additions and 57 deletions

View file

@ -0,0 +1,22 @@
---
source: src/algorithms/myers.rs
expression: d.into_inner().ops()
---
[
Equal {
old_index: 0,
new_index: 0,
len: 10,
},
Replace {
old_index: 10,
old_len: 41,
new_index: 10,
new_len: 41,
},
Equal {
old_index: 51,
new_index: 51,
len: 49,
},
]