diff --git a/crates/milli/src/update/index_documents/mod.rs b/crates/milli/src/update/index_documents/mod.rs index 1e91dfe5a..f8cf79144 100644 --- a/crates/milli/src/update/index_documents/mod.rs +++ b/crates/milli/src/update/index_documents/mod.rs @@ -522,7 +522,7 @@ where .is_some_and(|conf| conf.is_quantized); let is_quantizing = embedder_config.is_some_and(|action| action.is_being_quantized); - pool.install(|| -> Result<()> { + pool.install(|| -> Result<()> { let mut writer = ArroyWrapper::new(vector_arroy, embedder_index, was_quantized); writer.build_and_quantize( wtxn, diff --git a/crates/milli/src/update/new/channel.rs b/crates/milli/src/update/new/channel.rs index f4087c337..e41e380e3 100644 --- a/crates/milli/src/update/new/channel.rs +++ b/crates/milli/src/update/new/channel.rs @@ -1150,15 +1150,11 @@ impl GeoSender<'_, '_> { } } - #[derive(Clone, Copy)] pub struct GeoJsonSender<'a, 'b>(&'a ExtractorBbqueueSender<'b>); impl GeoJsonSender<'_, '_> { pub fn send_geojson(&self, docid: DocumentId, value: GeoJson) -> StdResult<(), SendError<()>> { - self.0 - .sender - .send(ReceiverAction::GeoJson(docid, value)) - .map_err(|_| SendError(())) + self.0.sender.send(ReceiverAction::GeoJson(docid, value)).map_err(|_| SendError(())) } } diff --git a/crates/milli/src/update/new/extract/geo/cellulite.rs b/crates/milli/src/update/new/extract/geo/cellulite.rs index 6f1f8f232..80e6a2884 100644 --- a/crates/milli/src/update/new/extract/geo/cellulite.rs +++ b/crates/milli/src/update/new/extract/geo/cellulite.rs @@ -99,7 +99,8 @@ pub struct FrozenGeoJsonExtractorData<'extractor> { impl FrozenGeoJsonExtractorData<'_> { pub fn iter_and_clear_removed( &mut self, - ) -> io::Result> + '_> { + ) -> io::Result> + '_> + { Ok(mem::take(&mut self.removed) .iter() .cloned() @@ -109,7 +110,8 @@ impl FrozenGeoJsonExtractorData<'_> { pub fn iter_and_clear_inserted( &mut self, - ) -> io::Result> + '_> { + ) -> io::Result> + '_> + { Ok(mem::take(&mut self.inserted) .iter() .cloned() @@ -215,9 +217,10 @@ impl<'extractor> Extractor<'extractor> for GeoJsonExtractor { file.write_all(geojson.get().as_bytes())?; } // TODO: Should be an internal error - None => data_ref.removed.push( - (docid, GeoJson::from_str(geojson.get()).map_err(UserError::from)?), - ), + None => data_ref.removed.push(( + docid, + GeoJson::from_str(geojson.get()).map_err(UserError::from)?, + )), } } @@ -228,9 +231,10 @@ impl<'extractor> Extractor<'extractor> for GeoJsonExtractor { file.write_all(geojson.get().as_bytes())?; } // TODO: Is the error type correct here? Shouldn't it be an internal error? - None => data_ref.inserted.push( - (docid, GeoJson::from_str(geojson.get()).map_err(UserError::from)?), - ), + None => data_ref.inserted.push(( + docid, + GeoJson::from_str(geojson.get()).map_err(UserError::from)?, + )), } } } @@ -248,9 +252,10 @@ impl<'extractor> Extractor<'extractor> for GeoJsonExtractor { file.write_all(geojson.get().as_bytes())?; } // TODO: Is the error type correct here? Shouldn't it be an internal error? - None => data_ref.inserted.push( - (docid, GeoJson::from_str(geojson.get()).map_err(UserError::from)?), - ), + None => data_ref.inserted.push(( + docid, + GeoJson::from_str(geojson.get()).map_err(UserError::from)?, + )), } } } diff --git a/crates/milli/src/update/new/indexer/extract.rs b/crates/milli/src/update/new/indexer/extract.rs index e360bdc4c..971aaf095 100644 --- a/crates/milli/src/update/new/indexer/extract.rs +++ b/crates/milli/src/update/new/indexer/extract.rs @@ -320,9 +320,9 @@ where )?; } - 'cellulite: { - let Some(extractor) = GeoJsonExtractor::new(&rtxn, index, *indexing_context.grenad_parameters)? + let Some(extractor) = + GeoJsonExtractor::new(&rtxn, index, *indexing_context.grenad_parameters)? else { break 'cellulite; }; diff --git a/crates/milli/src/update/new/merger.rs b/crates/milli/src/update/new/merger.rs index 4b558d5c2..670675c6b 100644 --- a/crates/milli/src/update/new/merger.rs +++ b/crates/milli/src/update/new/merger.rs @@ -63,7 +63,6 @@ where Ok(()) } - #[tracing::instrument(level = "trace", skip_all, target = "indexing::merge")] pub fn merge_and_send_cellulite<'extractor, MSP>( datastore: impl IntoIterator>>,