diff --git a/milli/src/search/facet/filter.rs b/milli/src/search/facet/filter.rs index 225d3ea8d..03ec03d39 100644 --- a/milli/src/search/facet/filter.rs +++ b/milli/src/search/facet/filter.rs @@ -490,14 +490,12 @@ impl<'a> From> for Filter<'a> { #[cfg(test)] mod tests { - use std::fmt::Write; - + use crate::index::tests::TempIndex; + use crate::Filter; use big_s::S; use either::Either; use maplit::hashset; - - use crate::index::tests::TempIndex; - use crate::Filter; + use std::fmt::Write; #[test] fn empty_db() { diff --git a/milli/src/snapshot_tests.rs b/milli/src/snapshot_tests.rs index a881a155e..f9929bb22 100644 --- a/milli/src/snapshot_tests.rs +++ b/milli/src/snapshot_tests.rs @@ -1,14 +1,16 @@ -use crate::{ - heed_codec::facet::{ - FacetLevelValueU32Codec, FacetStringLevelZeroCodec, FacetStringLevelZeroValueCodec, - FacetStringZeroBoundsValueCodec, - }, - make_db_snap_from_iter, CboRoaringBitmapCodec, ExternalDocumentsIds, Index, -}; -use heed::{types::ByteSlice, BytesDecode}; -use roaring::RoaringBitmap; +use std::borrow::Cow; +use std::fmt::Write; use std::path::Path; -use std::{borrow::Cow, fmt::Write}; + +use heed::types::ByteSlice; +use heed::BytesDecode; +use roaring::RoaringBitmap; + +use crate::heed_codec::facet::{ + FacetLevelValueU32Codec, FacetStringLevelZeroCodec, FacetStringLevelZeroValueCodec, + FacetStringZeroBoundsValueCodec, +}; +use crate::{make_db_snap_from_iter, CboRoaringBitmapCodec, ExternalDocumentsIds, Index}; #[track_caller] pub fn default_db_snapshot_settings_for_test(name: Option<&str>) -> insta::Settings { diff --git a/milli/src/update/facets.rs b/milli/src/update/facets.rs index 904f165b1..4c4963b56 100644 --- a/milli/src/update/facets.rs +++ b/milli/src/update/facets.rs @@ -347,11 +347,9 @@ fn write_string_entry( mod tests { use std::num::NonZeroUsize; - use crate::{ - db_snap, - documents::{batch_reader_from_documents, documents_batch_reader_from_objects}, - index::tests::TempIndex, - }; + use crate::db_snap; + use crate::documents::documents_batch_reader_from_objects; + use crate::index::tests::TempIndex; #[test] fn test_facets_number() { @@ -378,7 +376,7 @@ mod tests { for i in 0..100 { documents.push(serde_json::json!({ "facet2": i }).as_object().unwrap().clone()); } - let documents = batch_reader_from_documents(&documents); + let documents = documents_batch_reader_from_objects(documents); index.add_documents(documents).unwrap(); diff --git a/milli/src/update/word_prefix_pair_proximity_docids.rs b/milli/src/update/word_prefix_pair_proximity_docids.rs index 7e5d5c090..574b49e97 100644 --- a/milli/src/update/word_prefix_pair_proximity_docids.rs +++ b/milli/src/update/word_prefix_pair_proximity_docids.rs @@ -249,11 +249,9 @@ fn insert_current_prefix_data_in_sorter<'a>( mod tests { use std::io::Cursor; - use crate::{ - db_snap, - documents::{DocumentsBatchBuilder, DocumentsBatchReader}, - index::tests::TempIndex, - }; + use crate::db_snap; + use crate::documents::{DocumentsBatchBuilder, DocumentsBatchReader}; + use crate::index::tests::TempIndex; fn documents_with_enough_different_words_for_prefixes(prefixes: &[&str]) -> Vec { let mut documents = Vec::new();