Removed some warnings

This commit is contained in:
Louis Dureuil 2024-11-19 11:12:43 +01:00
parent 67ded73161
commit 1e04880873
No known key found for this signature in database
4 changed files with 6 additions and 9 deletions

View File

@ -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::*;

View File

@ -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<String>) {
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();
}

View File

@ -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 {

View File

@ -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;