Update milli/src/search/matching_words.rs

Co-authored-by: Clément Renault <renault.cle@gmail.com>
This commit is contained in:
Irevoire 2021-06-30 00:35:26 +02:00 committed by GitHub
parent be75e738b1
commit 6044b80362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -165,7 +165,6 @@ fn bytes_to_highlight(source: &str, target: &str) -> usize {
let mut minimum = 2;
for x in 0..=n {
// let dist = matrix[(x + 1, m + 1)];
let min_dist = (0..=m).map(|y| matrix[(x + 1, y + 1)]).min().unwrap();
if min_dist <= 2 {
minimum = x;