mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-11 15:38:55 +01:00
Simplify a Rust lifetime trick
This commit is contained in:
parent
3c295c1ffc
commit
a0e0fce677
@ -246,14 +246,13 @@ impl<'a> FacetDistribution<'a> {
|
|||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
let universe;
|
let universe;
|
||||||
let candidates;
|
let candidates = match &self.candidates {
|
||||||
match &self.candidates {
|
Some(cnd) => cnd,
|
||||||
Some(cnd) => candidates = cnd,
|
|
||||||
None => {
|
None => {
|
||||||
universe = self.index.documents_ids(self.rtxn)?;
|
universe = self.index.documents_ids(self.rtxn)?;
|
||||||
candidates = &universe;
|
&universe
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
self.facet_numbers_distribution_from_facet_levels(
|
self.facet_numbers_distribution_from_facet_levels(
|
||||||
field_id,
|
field_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user