From 9c271838760257564ab03db28227332562823499 Mon Sep 17 00:00:00 2001 From: mpostma Date: Mon, 15 Mar 2021 20:23:50 +0100 Subject: [PATCH] fix broken offset --- milli/src/search/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/src/search/mod.rs b/milli/src/search/mod.rs index ce5a6bc88..7560fbf0a 100644 --- a/milli/src/search/mod.rs +++ b/milli/src/search/mod.rs @@ -133,7 +133,7 @@ impl<'a> Search<'a> { initial_candidates.union_with(&bucket_candidates); if offset != 0 { - candidates.by_ref().skip(offset).for_each(drop); + candidates.by_ref().take(offset).for_each(drop); offset = offset.saturating_sub(len.min(offset)); len = len.saturating_sub(len.min(offset)); }