mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
Use saturating add
This commit is contained in:
parent
13e3f8faae
commit
359b90288d
1 changed files with 3 additions and 2 deletions
|
@ -731,8 +731,9 @@ impl SearchAggregator {
|
|||
}
|
||||
|
||||
// attributes_to_search_on
|
||||
self.attributes_to_search_on_total_number_of_uses +=
|
||||
other.attributes_to_search_on_total_number_of_uses;
|
||||
self.attributes_to_search_on_total_number_of_uses = self
|
||||
.attributes_to_search_on_total_number_of_uses
|
||||
.saturating_add(other.attributes_to_search_on_total_number_of_uses);
|
||||
|
||||
// q
|
||||
self.max_terms_number = self.max_terms_number.max(other.max_terms_number);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue