mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +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 candidates;
|
||||
match &self.candidates {
|
||||
Some(cnd) => candidates = cnd,
|
||||
let candidates = match &self.candidates {
|
||||
Some(cnd) => cnd,
|
||||
None => {
|
||||
universe = self.index.documents_ids(self.rtxn)?;
|
||||
candidates = &universe;
|
||||
&universe
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
self.facet_numbers_distribution_from_facet_levels(
|
||||
field_id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user