From 00f8d03f4349888b654456aa2cc2683aefffaece Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Wed, 18 Sep 2024 11:43:07 +0200 Subject: [PATCH] Use f32::min and f32::max --- meilisearch/src/search/federated.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meilisearch/src/search/federated.rs b/meilisearch/src/search/federated.rs index 170da4112..5279c26bb 100644 --- a/meilisearch/src/search/federated.rs +++ b/meilisearch/src/search/federated.rs @@ -408,10 +408,8 @@ impl FederatedFacets { std::collections::btree_map::Entry::Occupied(mut entry) => { let stats = entry.get_mut(); - stats.min = - if stats.min <= index_stats.min { stats.min } else { index_stats.min }; - stats.max = - if stats.max >= index_stats.max { stats.max } else { index_stats.max }; + stats.min = f64::min(stats.min, index_stats.min); + stats.max = f64::max(stats.max, index_stats.max); } } }