mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 21:20:24 +01:00
Cargo fmt + fix compiler warnings/error
This commit is contained in:
parent
6066256689
commit
8ac24d3114
@ -490,14 +490,12 @@ impl<'a> From<FilterCondition<'a>> 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() {
|
||||
|
@ -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 {
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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<crate::Object> {
|
||||
let mut documents = Vec::new();
|
||||
|
Loading…
x
Reference in New Issue
Block a user