From d53a80b408617c1a64c565afc427ff3c1de4a66b Mon Sep 17 00:00:00 2001 From: unvalley Date: Fri, 28 Oct 2022 23:41:35 +0900 Subject: [PATCH] Fix clippy error --- milli/src/update/facet/bulk.rs | 6 ++++-- milli/src/update/facet/incremental.rs | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/milli/src/update/facet/bulk.rs b/milli/src/update/facet/bulk.rs index 9dd62f49f..01a59c1f3 100644 --- a/milli/src/update/facet/bulk.rs +++ b/milli/src/update/facet/bulk.rs @@ -192,11 +192,12 @@ impl FacetsUpdateBulkInner { Ok((subwriters, all_docids)) } + #[allow(clippy::type_complexity)] fn read_level_0<'t>( &self, rtxn: &'t RoTxn, field_id: u16, - #[allow(clippy::type_complexity)] handle_group: &mut dyn FnMut( + handle_group: &mut dyn FnMut( &[RoaringBitmap], &'t [u8], ) -> Result<()>, @@ -248,12 +249,13 @@ impl FacetsUpdateBulkInner { /// ## Returns: /// A vector of grenad::Reader. The reader at index `i` corresponds to the elements of level `i + 1` /// that must be inserted into the database. + #[allow(clippy::type_complexity)] fn compute_higher_levels<'t>( &self, rtxn: &'t RoTxn, field_id: u16, level: u8, - #[allow(clippy::type_complexity)] handle_group: &mut dyn FnMut( + handle_group: &mut dyn FnMut( &[RoaringBitmap], &'t [u8], ) -> Result<()>, diff --git a/milli/src/update/facet/incremental.rs b/milli/src/update/facet/incremental.rs index 04d702987..c6735224d 100644 --- a/milli/src/update/facet/incremental.rs +++ b/milli/src/update/facet/incremental.rs @@ -236,7 +236,7 @@ impl FacetsUpdateIncrementalInner { let max_group_size = self.max_group_size; - let result = self.insert_in_level(txn, field_id, level - 1, &(*facet_value), docids)?; + let result = self.insert_in_level(txn, field_id, level - 1, facet_value, docids)?; // level below inserted an element let (insertion_key, insertion_value) = @@ -494,7 +494,7 @@ impl FacetsUpdateIncrementalInner { let (deletion_key, mut bitmap) = self.find_insertion_key_value(field_id, level, facet_value, txn)?; - let result = self.delete_in_level(txn, field_id, level - 1, &(*facet_value), docids)?; + let result = self.delete_in_level(txn, field_id, level - 1, facet_value, docids)?; let mut decrease_size = false; let next_key = match result {