mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-11 15:38:55 +01:00
Make clippy happy
This commit is contained in:
parent
9917bf046a
commit
b132e859f7
@ -582,7 +582,7 @@ pub fn perform_search(
|
|||||||
|
|
||||||
if fields.iter().all(|f| f != "*") {
|
if fields.iter().all(|f| f != "*") {
|
||||||
let fields: Vec<_> = fields
|
let fields: Vec<_> = fields
|
||||||
.into_iter()
|
.iter()
|
||||||
.map(|n| {
|
.map(|n| {
|
||||||
(
|
(
|
||||||
n,
|
n,
|
||||||
|
@ -296,7 +296,7 @@ impl<'a> FacetDistribution<'a> {
|
|||||||
}
|
}
|
||||||
.into());
|
.into());
|
||||||
} else {
|
} else {
|
||||||
facets.into_iter().map(|(name, _)| name).cloned().collect()
|
facets.iter().map(|(name, _)| name).cloned().collect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => filterable_fields,
|
None => filterable_fields,
|
||||||
@ -351,7 +351,7 @@ impl<'a> FacetDistribution<'a> {
|
|||||||
}
|
}
|
||||||
.into());
|
.into());
|
||||||
} else {
|
} else {
|
||||||
facets.into_iter().map(|(name, _)| name).cloned().collect()
|
facets.iter().map(|(name, _)| name).cloned().collect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None => filterable_fields,
|
None => filterable_fields,
|
||||||
@ -363,8 +363,7 @@ impl<'a> FacetDistribution<'a> {
|
|||||||
let order_by = self
|
let order_by = self
|
||||||
.facets
|
.facets
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|facets| facets.get(name).copied())
|
.and_then(|facets| facets.get(name).copied())
|
||||||
.flatten()
|
|
||||||
.unwrap_or(self.default_order_by);
|
.unwrap_or(self.default_order_by);
|
||||||
let values = self.facet_values(fid, order_by)?;
|
let values = self.facet_values(fid, order_by)?;
|
||||||
distribution.insert(name.to_string(), values);
|
distribution.insert(name.to_string(), values);
|
||||||
|
Loading…
Reference in New Issue
Block a user