Do a first clippy pass

This commit is contained in:
Clément Renault 2025-06-03 14:47:39 +02:00
parent 3c218cc3a0
commit 8fdcdee0cc
No known key found for this signature in database
GPG key ID: F250A4C4E3AE5F5F
7 changed files with 22 additions and 27 deletions

View file

@ -23,7 +23,7 @@ use crate::error::UserError;
use crate::fields_ids_map::metadata::{FieldIdMapWithMetadata, MetadataBuilder};
use crate::filterable_attributes_rules::match_faceted_field;
use crate::index::{
ChatConfig, IndexEmbeddingConfig, MatchingStrategy, PrefixSearch, RankingScoreThreshold,
ChatConfig, IndexEmbeddingConfig, PrefixSearch,
SearchParameters, DEFAULT_MIN_WORD_LEN_ONE_TYPO, DEFAULT_MIN_WORD_LEN_TWO_TYPOS,
};
use crate::order_by_map::OrderByMap;
@ -1326,7 +1326,7 @@ impl<'a, 't, 'i> Settings<'a, 't, 'i> {
},
matching_strategy: match matching_strategy {
Setting::Set(matching_strategy) => {
Some(MatchingStrategy::from(*matching_strategy))
Some(*matching_strategy)
}
Setting::Reset => None,
Setting::NotSet => search_parameters.matching_strategy,
@ -1341,7 +1341,7 @@ impl<'a, 't, 'i> Settings<'a, 't, 'i> {
}
},
ranking_score_threshold: match ranking_score_threshold {
Setting::Set(rst) => Some(RankingScoreThreshold::from(*rst)),
Setting::Set(rst) => Some(*rst),
Setting::Reset => None,
Setting::NotSet => search_parameters.ranking_score_threshold,
},