Cargo fmt + fix compiler warnings/error

This commit is contained in:
Loïc Lecrenier
2022-08-04 10:50:38 +02:00
parent 6066256689
commit 8ac24d3114
4 changed files with 22 additions and 26 deletions

View File

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

View File

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