Simplify a Rust lifetime trick

This commit is contained in:
Clément Renault 2023-06-28 14:29:12 +02:00
parent 3c295c1ffc
commit a0e0fce677
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -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,