Fixup imports

This commit is contained in:
Louis Dureuil 2024-10-21 10:39:31 +02:00
parent aff8ca4397
commit 9fe5122176
No known key found for this signature in database
3 changed files with 9 additions and 14 deletions

View File

@ -171,12 +171,12 @@ mod test {
use bumpalo::Bump;
use charabia::TokenizerBuilder;
use meili_snap::snapshot;
use raw_collections::RawMap;
use serde_json::json;
use serde_json::value::RawValue;
use super::*;
use crate::update::new::document::{DocumentFromVersions, Versions};
use crate::FieldsIdsMap;
#[test]
@ -222,7 +222,8 @@ mod test {
let bump = Bump::new();
let document: &RawValue = serde_json::from_str(&document).unwrap();
let document = RawMap::from_raw_value(document, &bump).unwrap();
let document = document.into_bump_slice();
let document = DocumentFromVersions::new(Versions::single(document));
document_tokenizer
.tokenize_document(

View File

@ -1,15 +1,12 @@
use std::ops::DerefMut;
use rayon::iter::IndexedParallelIterator;
use serde::Deserializer;
use serde_json::value::RawValue;
use super::de::FieldAndDocidExtractor;
use super::document_changes::{DocumentChangeContext, DocumentChanges, MostlySend, RefCellExt};
use crate::documents::{DocumentIdExtractionError, PrimaryKey};
use crate::documents::PrimaryKey;
use crate::update::concurrent_available_ids::ConcurrentAvailableIds;
use crate::update::new::document::DocumentFromVersions;
use crate::update::new::document_change::Versions;
use crate::update::new::document::{DocumentFromVersions, Versions};
use crate::update::new::{DocumentChange, Insertion};
use crate::{Error, InternalError, Result, UserError};
@ -79,8 +76,7 @@ where
let document = raw_collections::RawMap::from_raw_value(document, doc_alloc)
.map_err(InternalError::SerdeJson)?;
let document = document.into_bump_slice();
let document = DocumentFromVersions::new(Versions::Single(document));
let document = DocumentFromVersions::new(Versions::single(document));
let insertion = Insertion::create(docid, external_document_id, document);
Ok(Some(DocumentChange::Insertion(insertion)))

View File

@ -9,8 +9,7 @@ use super::DocumentChanges;
use crate::documents::Error::InvalidDocumentFormat;
use crate::documents::PrimaryKey;
use crate::error::{FieldIdMapMissingEntry, InternalError};
use crate::update::new::document::DocumentFromVersions;
use crate::update::new::document_change::Versions;
use crate::update::new::document::{DocumentFromVersions, Versions};
use crate::update::new::{Deletion, DocumentChange, KvReaderFieldId, Update};
use crate::{all_obkv_to_json, Error, FieldsIdsMap, Object, Result, UserError};
@ -161,9 +160,8 @@ impl<'index> DocumentChanges<'index> for UpdateByFunctionChanges<'index> {
} else {
let raw_new_doc = RawMap::from_raw_value(raw_new_doc, doc_alloc)
.map_err(InternalError::SerdeJson)?;
let new_doc_version = DocumentFromVersions::new(Versions::Single(
raw_new_doc.into_bump_slice(),
));
let new_doc_version =
DocumentFromVersions::new(Versions::single(raw_new_doc));
Ok(Some(DocumentChange::Update(Update::create(
docid,
new_document_id,