From 1cc4b2cd4efa6aee1d6749c9a0084a569bb1f031 Mon Sep 17 00:00:00 2001 From: Zhenchi Date: Fri, 1 Dec 2023 07:53:50 +0000 Subject: [PATCH] fix: fmt & clippy Signed-off-by: Zhenchi --- src/index/src/inverted_index/search.rs | 2 +- src/index/src/inverted_index/search/fst_values_mapper.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/index/src/inverted_index/search.rs b/src/index/src/inverted_index/search.rs index 236c5e6c6f1c..e4ab3d5c3b70 100644 --- a/src/index/src/inverted_index/search.rs +++ b/src/index/src/inverted_index/search.rs @@ -13,5 +13,5 @@ // limitations under the License. pub mod fst_apply; -pub mod predicate; pub mod fst_values_mapper; +pub mod predicate; diff --git a/src/index/src/inverted_index/search/fst_values_mapper.rs b/src/index/src/inverted_index/search/fst_values_mapper.rs index bd17d75a0286..811fbb5641b3 100644 --- a/src/index/src/inverted_index/search/fst_values_mapper.rs +++ b/src/index/src/inverted_index/search/fst_values_mapper.rs @@ -53,11 +53,11 @@ impl<'a> FstValuesMapper<'a> { .await?; // Ensure the longest BitVec is the left operand to prevent truncation during OR. - bitmap = if bm.len() > bitmap.len() { - bm | bitmap + if bm.len() > bitmap.len() { + bitmap = bm | bitmap } else { - bitmap | bm - }; + bitmap |= bm + } } Ok(bitmap)