From 9e0eb5ebb012e7385a7bc32e8d4d29c4302e7343 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 19 Nov 2024 11:12:43 +0100 Subject: [PATCH] Removed some warnings --- crates/milli/src/documents/mod.rs | 2 +- crates/milli/src/index.rs | 4 ++-- crates/milli/src/search/new/tests/integration.rs | 7 ++----- crates/milli/src/update/facet/bulk.rs | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/crates/milli/src/documents/mod.rs b/crates/milli/src/documents/mod.rs index 64ad5dbab..2d27fed48 100644 --- a/crates/milli/src/documents/mod.rs +++ b/crates/milli/src/documents/mod.rs @@ -183,7 +183,7 @@ pub fn documents_batch_reader_from_objects( mod test { use std::io::Cursor; - use serde_json::{json, Value}; + use serde_json::json; use super::*; diff --git a/crates/milli/src/index.rs b/crates/milli/src/index.rs index 7c6b6e9f2..a7601050d 100644 --- a/crates/milli/src/index.rs +++ b/crates/milli/src/index.rs @@ -1749,7 +1749,7 @@ pub(crate) mod tests { let db_fields_ids_map = self.inner.fields_ids_map(&rtxn)?; let mut new_fields_ids_map = db_fields_ids_map.clone(); - let embedders = EmbeddingConfigs::default(); + let embedders = EmbeddingConfigs::default(); /// TODO: fetch configs from the index let mut indexer = indexer::DocumentOperation::new(IndexDocumentsMethod::ReplaceDocuments); indexer.add_documents(&documents).unwrap(); @@ -1867,7 +1867,7 @@ pub(crate) mod tests { pub fn delete_documents(&self, external_document_ids: Vec) { let mut wtxn = self.write_txn().unwrap(); - self.delete_documents_using_wtxn(&mut wtxn, external_document_ids); + self.delete_documents_using_wtxn(&mut wtxn, external_document_ids).unwrap(); wtxn.commit().unwrap(); } diff --git a/crates/milli/src/search/new/tests/integration.rs b/crates/milli/src/search/new/tests/integration.rs index 25d63ed6e..7880d4a8a 100644 --- a/crates/milli/src/search/new/tests/integration.rs +++ b/crates/milli/src/search/new/tests/integration.rs @@ -5,13 +5,10 @@ use bumpalo::Bump; use heed::EnvOpenOptions; use maplit::{btreemap, hashset}; -use crate::documents::{DocumentsBatchBuilder, DocumentsBatchReader}; use crate::update::new::indexer; -use crate::update::{ - IndexDocuments, IndexDocumentsConfig, IndexDocumentsMethod, IndexerConfig, Settings, -}; +use crate::update::{IndexDocumentsMethod, IndexerConfig, Settings}; use crate::vector::EmbeddingConfigs; -use crate::{db_snap, Criterion, Index, Object}; +use crate::{db_snap, Criterion, Index}; pub const CONTENT: &str = include_str!("../../../../tests/assets/test_set.ndjson"); pub fn setup_search_index_with_criteria(criteria: &[Criterion]) -> Index { diff --git a/crates/milli/src/update/facet/bulk.rs b/crates/milli/src/update/facet/bulk.rs index 378b6b6da..d3f74170f 100644 --- a/crates/milli/src/update/facet/bulk.rs +++ b/crates/milli/src/update/facet/bulk.rs @@ -369,7 +369,7 @@ mod tests { use maplit::hashset; use roaring::RoaringBitmap; - use crate::documents::{documents_batch_reader_from_objects, mmap_from_objects}; + use crate::documents::mmap_from_objects; use crate::heed_codec::facet::OrderedF64Codec; use crate::heed_codec::StrRefCodec; use crate::index::tests::TempIndex;