diff --git a/examples/working_with_json.rs b/examples/working_with_json.rs index 34c33ab84..108379856 100644 --- a/examples/working_with_json.rs +++ b/examples/working_with_json.rs @@ -1,4 +1,3 @@ - use tantivy::schema::*; // # Document from json diff --git a/src/core/index_meta.rs b/src/core/index_meta.rs index 41bf56c8b..8a199d386 100644 --- a/src/core/index_meta.rs +++ b/src/core/index_meta.rs @@ -369,7 +369,6 @@ mod tests { schema::{Schema, TEXT}, IndexSettings, IndexSortByField, Order, }; - #[test] fn test_serialize_metas() { diff --git a/src/fastfield/serializer/mod.rs b/src/fastfield/serializer/mod.rs index 55a4894dc..2279ce1b5 100644 --- a/src/fastfield/serializer/mod.rs +++ b/src/fastfield/serializer/mod.rs @@ -46,11 +46,7 @@ fn codec_estimation( if !T::is_applicable(fastfield_accessor, stats.clone()) { return; } - let (ratio, name, id) = ( - T::estimate(fastfield_accessor, stats), - T::NAME, - T::ID, - ); + let (ratio, name, id) = (T::estimate(fastfield_accessor, stats), T::NAME, T::ID); estimations.push((ratio, name, id)); } diff --git a/src/postings/postings_writer.rs b/src/postings/postings_writer.rs index 02a5570b4..f4d61f807 100644 --- a/src/postings/postings_writer.rs +++ b/src/postings/postings_writer.rs @@ -231,13 +231,7 @@ pub trait PostingsWriter { // We skip all tokens with a len greater than u16. if token.text.len() <= MAX_TOKEN_LEN { term_buffer.set_text(token.text.as_str()); - self.subscribe( - term_index, - doc_id, - token.position as u32, - term_buffer, - heap, - ); + self.subscribe(term_index, doc_id, token.position as u32, term_buffer, heap); } else { warn!( "A token exceeding MAX_TOKEN_LEN ({}>{}) was dropped. Search for \ diff --git a/src/query/union.rs b/src/query/union.rs index 73b13773c..8185f7c6c 100644 --- a/src/query/union.rs +++ b/src/query/union.rs @@ -318,7 +318,8 @@ mod tests { let docset_factory = || { let res: Box = Box::new(Union::<_, DoNothingCombiner>::from( docs_list - .iter().cloned() + .iter() + .cloned() .map(VecDocSet::from) .map(|docset| ConstScorer::new(docset, 1.0)) .collect::>(), diff --git a/src/store/index/mod.rs b/src/store/index/mod.rs index 2d87caa2b..d8b7bb294 100644 --- a/src/store/index/mod.rs +++ b/src/store/index/mod.rs @@ -40,7 +40,7 @@ impl fmt::Debug for Checkpoint { #[cfg(test)] mod tests { - use std::{io}; + use std::io; use futures::executor::block_on; use proptest::strategy::{BoxedStrategy, Strategy}; @@ -216,7 +216,8 @@ mod tests { target: DocId, ) -> Option { checkpoints - .into_iter().find(|checkpoint| checkpoint.doc_range.end > target) + .into_iter() + .find(|checkpoint| checkpoint.doc_range.end > target) } fn test_skip_index_aux(skip_index: SkipIndex, checkpoints: &[Checkpoint]) { diff --git a/tests/failpoints/mod.rs b/tests/failpoints/mod.rs index b458b134a..238881074 100644 --- a/tests/failpoints/mod.rs +++ b/tests/failpoints/mod.rs @@ -1,4 +1,3 @@ - use std::path::Path; use tantivy::directory::{Directory, ManagedDirectory, RamDirectory, TerminatingWrite}; use tantivy::doc;