From 671bd3374fce42949ac96db61cdb0ca75c93e1e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Mon, 10 Dec 2018 15:14:15 +0100 Subject: [PATCH] fix: Break the proper loop when bucket sorting --- src/rank/query_builder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rank/query_builder.rs b/src/rank/query_builder.rs index 5d6483d2e..fec11819b 100644 --- a/src/rank/query_builder.rs +++ b/src/rank/query_builder.rs @@ -112,11 +112,11 @@ where D: Deref, let mut groups = vec![documents.as_mut_slice()]; let view = &self.view; - 'group: for criterion in &self.criteria { + for criterion in &self.criteria { let tmp_groups = mem::replace(&mut groups, Vec::new()); let mut computed = 0; - for group in tmp_groups { + 'group: for group in tmp_groups { group.sort_unstable_by(|a, b| criterion.evaluate(a, b, view)); for group in GroupByMut::new(group, |a, b| criterion.eq(a, b, view)) { computed += group.len();