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