Skip to content

Commit

Permalink
Applied clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
leontoeides committed Mar 29, 2024
1 parent 8db5dbc commit 03c4d41
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 16 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/simple/autocomplete/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl<K: Hash + Ord> SearchIndex<K> {
// 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
Expand Down
2 changes: 1 addition & 1 deletion src/simple/autocomplete/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl<K: Hash + Ord> SearchIndex<K> {
// 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
Expand Down
2 changes: 1 addition & 1 deletion src/simple/autocomplete/keyword.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl<K: Hash + Ord> SearchIndex<K> {
// 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

Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/strsim/autocomplete/context_jaro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl<K: Hash + Ord> SearchIndex<K> {
// 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl<K: Hash + Ord> SearchIndex<K> {
// 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<K: Hash + Ord> SearchIndex<K> {
// 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

Expand Down
2 changes: 1 addition & 1 deletion src/simple/internal/strsim/autocomplete/global_jaro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<K: Hash + Ord> SearchIndex<K> {
// 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<K: Hash + Ord> SearchIndex<K> {
// 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<K: Hash + Ord> SearchIndex<K> {
// 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

Expand Down
14 changes: 7 additions & 7 deletions src/simple/internal/strsim/mod.rs
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 03c4d41

Please sign in to comment.