From cd0d211add6dc59269545a724874c13898b5a3d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 17 Oct 2024 10:50:52 +0200 Subject: [PATCH] Remove useless commented code --- milli/src/update/new/extract/cache.rs | 5 +---- .../update/new/extract/searchable/extract_word_docids.rs | 6 ++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/milli/src/update/new/extract/cache.rs b/milli/src/update/new/extract/cache.rs index 200ca7be4..c58078dda 100644 --- a/milli/src/update/new/extract/cache.rs +++ b/milli/src/update/new/extract/cache.rs @@ -211,10 +211,7 @@ pub struct SpilledCache { } impl SpilledCache { - pub fn reconstruct<'extractor>( - self, - alloc: RefBump<'extractor>, - ) -> CboCachedSorter<'extractor, MF> { + pub fn reconstruct(self, alloc: RefBump<'_>) -> CboCachedSorter<'_, MF> { let SpilledCache { sorter, deladd_buffer, cbo_buffer, total_insertions, fitted_in_key } = self; diff --git a/milli/src/update/new/extract/searchable/extract_word_docids.rs b/milli/src/update/new/extract/searchable/extract_word_docids.rs index ca73a0922..ec934170f 100644 --- a/milli/src/update/new/extract/searchable/extract_word_docids.rs +++ b/milli/src/update/new/extract/searchable/extract_word_docids.rs @@ -324,6 +324,8 @@ impl<'extractor> Extractor<'extractor> for WordDocidsExtractorData<'extractor> { exact_word_docids, word_position_docids, fid_word_count_docids, + // Note that fid_word_count and current_docid do not have any reference + // to any 'extractor-allocated memory so we don't have to spill it to disk fid_word_count, current_docid, } = sorters; @@ -333,8 +335,6 @@ impl<'extractor> Extractor<'extractor> for WordDocidsExtractorData<'extractor> { let spilled_exact_word_docids = exact_word_docids.spill_to_disk()?; let spilled_word_position_docids = word_position_docids.spill_to_disk()?; let spilled_fid_word_count_docids = fid_word_count_docids.spill_to_disk()?; - // let spilled_fid_word_count = fid_word_count.spill_to_disk()?; - // let spilled_current_docid = current_docid.spill_to_disk()?; extractor_alloc.borrow_mut().reset(); @@ -345,8 +345,6 @@ impl<'extractor> Extractor<'extractor> for WordDocidsExtractorData<'extractor> { exact_word_docids: spilled_exact_word_docids.reconstruct(RefBump::clone(&alloc)), word_position_docids: spilled_word_position_docids.reconstruct(RefBump::clone(&alloc)), fid_word_count_docids: spilled_fid_word_count_docids.reconstruct(alloc), - // fid_word_count: spilled_fid_word_count.reconstruct(), - // current_docid: spilled_current_docid.reconstruct(), fid_word_count, current_docid, });