Skip to content

Commit 3bebcb9

Browse files
committed
fix flipped boolean logic
Signed-off-by: Luke Steensen <luke.steensen@gmail.com>
1 parent b3e7cfe commit 3bebcb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vrl/compiler/src/expression/levenstein.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub(crate) fn distance(word1: &[char], word2: &[char]) -> usize {
2929

3030
for row in 1..n {
3131
for col in 1..m {
32-
let cost = usize::from(word1[col - 1] == word2[row - 1]);
32+
let cost = usize::from(word1[col - 1] != word2[row - 1]);
3333

3434
matrix[pos(col, row)] = min3(
3535
matrix[pos(col - 1, row)] + 1,

0 commit comments

Comments
 (0)