mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Make cargo fmt happy
This commit is contained in:
parent
64477aac60
commit
a0bfcf8872
13 changed files with 29 additions and 38 deletions
|
@ -236,7 +236,8 @@ impl<'a> Filter<'a> {
|
|||
let filterable_attributes_rules = index.filterable_attributes_rules(rtxn)?;
|
||||
for fid in self.condition.fids(MAX_FILTER_DEPTH) {
|
||||
let attribute = fid.value();
|
||||
if matching_features(attribute, &filterable_attributes_rules).is_some_and(|(_, features)| features.is_filterable())
|
||||
if matching_features(attribute, &filterable_attributes_rules)
|
||||
.is_some_and(|(_, features)| features.is_filterable())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -191,8 +191,7 @@ impl<'a> Search<'a> {
|
|||
let filterable_fields = ctx.index.filterable_attributes_rules(ctx.txn)?;
|
||||
// check if the distinct field is in the filterable fields
|
||||
let matched_rule = matching_features(distinct, &filterable_fields);
|
||||
let is_filterable =
|
||||
matched_rule.is_some_and(|(_, features)| features.is_filterable());
|
||||
let is_filterable = matched_rule.is_some_and(|(_, features)| features.is_filterable());
|
||||
|
||||
if !is_filterable {
|
||||
// if not, remove the hidden fields from the filterable fields to generate the error message
|
||||
|
|
|
@ -71,7 +71,8 @@ pub fn find_best_match_interval(matches: &[Match], crop_size: usize) -> [&Match;
|
|||
let mut save_best_interval = |interval_first, interval_last| {
|
||||
let interval_score = get_interval_score(&matches[interval_first..=interval_last]);
|
||||
let is_interval_score_better = &best_interval
|
||||
.as_ref().is_none_or(|MatchIntervalWithScore { score, .. }| interval_score > *score);
|
||||
.as_ref()
|
||||
.is_none_or(|MatchIntervalWithScore { score, .. }| interval_score > *score);
|
||||
|
||||
if *is_interval_score_better {
|
||||
best_interval = Some(MatchIntervalWithScore {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue