mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-26 06:30:05 +01:00
fix clippy warnings
This commit is contained in:
parent
f5ddea481a
commit
8f05d8d546
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1700,7 +1700,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "meilisearch-tokenizer"
|
||||
version = "0.2.3"
|
||||
source = "git+https://github.com/meilisearch/Tokenizer.git?tag=v0.2.3#c2399c3f879144ad92e20ae057e14984dfd22781"
|
||||
source = "git+https://github.com/meilisearch/tokenizer.git?tag=v0.2.3#c2399c3f879144ad92e20ae057e14984dfd22781"
|
||||
dependencies = [
|
||||
"character_converter",
|
||||
"cow-utils",
|
||||
|
@ -144,17 +144,17 @@ impl From<Settings> for index_controller::Settings<Unchecked> {
|
||||
// String
|
||||
filterable_attributes: settings.attributes_for_faceting.map(|o| o.map(|vec| vec.into_iter().collect())),
|
||||
// we need to convert the old `Vec<String>` into a `BTreeSet<String>`
|
||||
ranking_rules: settings.ranking_rules.map(|o| o.map(|vec| vec.into_iter().filter_map(|criterion| {
|
||||
ranking_rules: settings.ranking_rules.map(|o| o.map(|vec| vec.into_iter().filter(|criterion| {
|
||||
match criterion.as_str() {
|
||||
"words" | "typo" | "proximity" | "attribute" | "exactness" => Some(criterion),
|
||||
s if s.starts_with("asc") || s.starts_with("desc") => Some(criterion),
|
||||
"words" | "typo" | "proximity" | "attribute" | "exactness" => true,
|
||||
s if s.starts_with("asc") || s.starts_with("desc") => true,
|
||||
"wordsPosition" => {
|
||||
warn!("The criteria `attribute` and `wordsPosition` have been merged into a single criterion `attribute` so `wordsPositon` will be ignored");
|
||||
None
|
||||
false
|
||||
}
|
||||
s => {
|
||||
error!("Unknown criterion found in the dump: `{}`, it will be ignored", s);
|
||||
None
|
||||
false
|
||||
}
|
||||
}
|
||||
}).collect())),
|
||||
|
Loading…
x
Reference in New Issue
Block a user