Improve the mDFS performance and return the proximity

This commit is contained in:
Kerollmops
2020-10-05 16:40:33 +02:00
parent bb15f16d8c
commit e9e03259c1
3 changed files with 30 additions and 25 deletions

View File

@ -90,7 +90,7 @@ fn is_chinese(c: char) -> bool {
/// length of the found key. Otherwise `None` is returned.
///
/// This can be used to e.g. build tokenizing functions.
//
// Copyright @llogiq
// https://github.com/BurntSushi/fst/pull/104
#[inline]
fn find_longest_prefix(fst: &Fst<&[u8]>, value: &[u8]) -> Option<(u64, usize)> {