From 1693d1a311cdfeef8f41c19f00e4620c2378fa91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Wed, 10 Jul 2024 10:09:39 +0200 Subject: [PATCH] Simplify the check to decide to stop a loop --- .../search/new/ranking_rule_graph/proximity/compute_docids.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/src/search/new/ranking_rule_graph/proximity/compute_docids.rs b/milli/src/search/new/ranking_rule_graph/proximity/compute_docids.rs index 4ef83b534..68b934e20 100644 --- a/milli/src/search/new/ranking_rule_graph/proximity/compute_docids.rs +++ b/milli/src/search/new/ranking_rule_graph/proximity/compute_docids.rs @@ -78,7 +78,7 @@ pub fn compute_docids( continue; } } else if let Some(left_word_docids) = ctx.word_docids(Some(universe), left_word)? { - if universe.is_disjoint(&left_word_docids) { + if left_word_docids.is_empty() { continue; } }