diff --git a/CHANGELOG.md b/CHANGELOG.md index 39f327b..f2e9430 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,9 @@ * Release notes are available on [GitHub](https://github.com/leontoeides/indicium/releases). +* `0.6.1`: Removed `eddie` as the default string similarity crate, for now, due +to a potential `panic`. + * `0.6.0`: Fix for contextual fuzzy matching for `Live` interactive searches. In some cases `Live` search would return global results without properly observing the `maximum_search_results` setting. This has been fixed. This will diff --git a/README.md b/README.md index f7edc22..e193172 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,9 @@ performance may begin to degrade at a point. log](https://github.com/leontoeides/indicium/blob/master/CHANGELOG.md) is available on GitHub. +* `0.6.1`: Removed `eddie` as the default string similarity crate, for now, due +to a potential `panic`. + * `0.6.0`: Fix for contextual fuzzy matching for `Live` interactive searches. In some cases `Live` search would return global results without properly observing the `maximum_search_results` setting. This has been fixed. This will diff --git a/src/simple/autocomplete/context.rs b/src/simple/autocomplete/context.rs index 2ba4e4c..5dbc6f3 100644 --- a/src/simple/autocomplete/context.rs +++ b/src/simple/autocomplete/context.rs @@ -192,7 +192,7 @@ impl SearchIndex { // discard the keys: .map(|(keyword, _keys)| keyword) // Collect all keyword autocompletions into a `Vec`: - .collect() + .collect(); } // if // Push a blank placeholder onto the end of the keyword list. We diff --git a/src/simple/autocomplete/global.rs b/src/simple/autocomplete/global.rs index 765509c..b60361f 100644 --- a/src/simple/autocomplete/global.rs +++ b/src/simple/autocomplete/global.rs @@ -190,7 +190,7 @@ impl SearchIndex { // discard the keys: .map(|(keyword, _keys)| keyword) // Collect all keyword autocompletions into a `Vec`: - .collect() + .collect(); } // if // Push a blank placeholder onto the end of the keyword list. We diff --git a/src/simple/autocomplete/keyword.rs b/src/simple/autocomplete/keyword.rs index 67ce1db..ec63cc0 100644 --- a/src/simple/autocomplete/keyword.rs +++ b/src/simple/autocomplete/keyword.rs @@ -173,7 +173,7 @@ impl SearchIndex { // There were some matches. Return the results without processing: autocomplete_options .into_iter() - .map(|kstring| kstring.as_str()) + .map(kstring::KStringBase::as_str) .collect() } // if diff --git a/src/simple/internal/strsim/autocomplete/context_jaro.rs b/src/simple/internal/strsim/autocomplete/context_jaro.rs index f89f620..7022abb 100644 --- a/src/simple/internal/strsim/autocomplete/context_jaro.rs +++ b/src/simple/internal/strsim/autocomplete/context_jaro.rs @@ -70,7 +70,7 @@ impl SearchIndex { // Insert the score into the top scores (if it's normal and high // enough): if score.is_normal() && score >= self.fuzzy_minimum_score { - top_scores.insert(index_keyword, index_keys, score) + top_scores.insert(index_keyword, index_keys, score); } // if }); // for_each diff --git a/src/simple/internal/strsim/autocomplete/context_sorensen_dice.rs b/src/simple/internal/strsim/autocomplete/context_sorensen_dice.rs index f6731d3..47ca2c6 100644 --- a/src/simple/internal/strsim/autocomplete/context_sorensen_dice.rs +++ b/src/simple/internal/strsim/autocomplete/context_sorensen_dice.rs @@ -70,7 +70,7 @@ impl SearchIndex { // Insert the score into the top scores (if it's normal and high // enough): if score.is_normal() && score >= self.fuzzy_minimum_score { - top_scores.insert(index_keyword, index_keys, score) + top_scores.insert(index_keyword, index_keys, score); } // if }); // for_each diff --git a/src/simple/internal/strsim/autocomplete/global_damerau_levenshtein.rs b/src/simple/internal/strsim/autocomplete/global_damerau_levenshtein.rs index bee561d..adb4c9c 100644 --- a/src/simple/internal/strsim/autocomplete/global_damerau_levenshtein.rs +++ b/src/simple/internal/strsim/autocomplete/global_damerau_levenshtein.rs @@ -54,7 +54,7 @@ impl SearchIndex { // Insert the score into the top scores (if it's normal and high // enough): if score.is_normal() && score >= self.fuzzy_minimum_score { - top_scores.insert(index_keyword, index_keys, score) + top_scores.insert(index_keyword, index_keys, score); } // if }); // for_each diff --git a/src/simple/internal/strsim/autocomplete/global_jaro.rs b/src/simple/internal/strsim/autocomplete/global_jaro.rs index 2c963c0..a84c9b9 100644 --- a/src/simple/internal/strsim/autocomplete/global_jaro.rs +++ b/src/simple/internal/strsim/autocomplete/global_jaro.rs @@ -54,7 +54,7 @@ impl SearchIndex { // Insert the score into the top scores (if it's normal and high // enough): if score.is_normal() && score >= self.fuzzy_minimum_score { - top_scores.insert(index_keyword, index_keys, score) + top_scores.insert(index_keyword, index_keys, score); } // if }); // for_each diff --git a/src/simple/internal/strsim/autocomplete/global_jaro_winkler.rs b/src/simple/internal/strsim/autocomplete/global_jaro_winkler.rs index da75fd0..e7bb0cb 100644 --- a/src/simple/internal/strsim/autocomplete/global_jaro_winkler.rs +++ b/src/simple/internal/strsim/autocomplete/global_jaro_winkler.rs @@ -54,7 +54,7 @@ impl SearchIndex { // Insert the score into the top scores (if it's normal and high // enough): if score.is_normal() && score >= self.fuzzy_minimum_score { - top_scores.insert(index_keyword, index_keys, score) + top_scores.insert(index_keyword, index_keys, score); } // if }); // for_each diff --git a/src/simple/internal/strsim/autocomplete/global_sorensen_dice.rs b/src/simple/internal/strsim/autocomplete/global_sorensen_dice.rs index 70e34c3..9f79ea2 100644 --- a/src/simple/internal/strsim/autocomplete/global_sorensen_dice.rs +++ b/src/simple/internal/strsim/autocomplete/global_sorensen_dice.rs @@ -54,7 +54,7 @@ impl SearchIndex { // Insert the score into the top scores (if it's normal and high // enough): if score.is_normal() && score >= self.fuzzy_minimum_score { - top_scores.insert(index_keyword, index_keys, score) + top_scores.insert(index_keyword, index_keys, score); } // if }); // for_each diff --git a/src/simple/internal/strsim/mod.rs b/src/simple/internal/strsim/mod.rs index fef7f36..44750ef 100644 --- a/src/simple/internal/strsim/mod.rs +++ b/src/simple/internal/strsim/mod.rs @@ -1,10 +1,10 @@ //! Integration with Danny Guo's [strsim](https://crates.io/crates/strsim) //! string similarity crate. -pub(crate) mod autocomplete; -pub(crate) mod keyword; -pub(crate) mod strsim_autocomplete; -pub(crate) mod strsim_context_autocomplete; -pub(crate) mod strsim_global_autocomplete; -pub(crate) mod strsim_global_keyword; -pub(crate) mod strsim_keyword; +pub mod autocomplete; +pub mod keyword; +pub mod strsim_autocomplete; +pub mod strsim_context_autocomplete; +pub mod strsim_global_autocomplete; +pub mod strsim_global_keyword; +pub mod strsim_keyword;