mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-29 16:45:30 +08: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]]
|
[[package]]
|
||||||
name = "meilisearch-tokenizer"
|
name = "meilisearch-tokenizer"
|
||||||
version = "0.2.3"
|
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 = [
|
dependencies = [
|
||||||
"character_converter",
|
"character_converter",
|
||||||
"cow-utils",
|
"cow-utils",
|
||||||
|
@ -144,17 +144,17 @@ impl From<Settings> for index_controller::Settings<Unchecked> {
|
|||||||
// String
|
// String
|
||||||
filterable_attributes: settings.attributes_for_faceting.map(|o| o.map(|vec| vec.into_iter().collect())),
|
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>`
|
// 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() {
|
match criterion.as_str() {
|
||||||
"words" | "typo" | "proximity" | "attribute" | "exactness" => Some(criterion),
|
"words" | "typo" | "proximity" | "attribute" | "exactness" => true,
|
||||||
s if s.starts_with("asc") || s.starts_with("desc") => Some(criterion),
|
s if s.starts_with("asc") || s.starts_with("desc") => true,
|
||||||
"wordsPosition" => {
|
"wordsPosition" => {
|
||||||
warn!("The criteria `attribute` and `wordsPosition` have been merged into a single criterion `attribute` so `wordsPositon` will be ignored");
|
warn!("The criteria `attribute` and `wordsPosition` have been merged into a single criterion `attribute` so `wordsPositon` will be ignored");
|
||||||
None
|
false
|
||||||
}
|
}
|
||||||
s => {
|
s => {
|
||||||
error!("Unknown criterion found in the dump: `{}`, it will be ignored", s);
|
error!("Unknown criterion found in the dump: `{}`, it will be ignored", s);
|
||||||
None
|
false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).collect())),
|
}).collect())),
|
||||||
|
Loading…
Reference in New Issue
Block a user