mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-07 09:32:54 +00:00
Cargo fmt
This commit is contained in:
@@ -79,7 +79,8 @@ impl<T: FastValue + PartialOrd + Clone> TopDocsByField<T> {
|
||||
/// This constructor is crate-private. Client are supposed to call
|
||||
/// build `TopDocsByField` object using the `TopDocs` API.
|
||||
///
|
||||
/// e.g.: `TopDocs::with_limit(2).order_by_field(sort_by_field)`
|
||||
/// e.g.:
|
||||
/// `TopDocs::with_limit(2).order_by_field(sort_by_field)`
|
||||
///
|
||||
/// # Panics
|
||||
/// The method panics if limit is 0
|
||||
|
||||
@@ -80,7 +80,7 @@ where
|
||||
(1u64 << num_bits) - 1u64
|
||||
};
|
||||
BitUnpacker {
|
||||
num_bits: u64::from(num_bits) ,
|
||||
num_bits: u64::from(num_bits),
|
||||
mask,
|
||||
data,
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ impl<Item: FastValue> FastFieldReader<Item> {
|
||||
/// May panic if `doc` is greater than the segment
|
||||
// `maxdoc`.
|
||||
pub fn get(&self, doc: DocId) -> Item {
|
||||
self.get_u64(u64::from(doc ))
|
||||
self.get_u64(u64::from(doc))
|
||||
}
|
||||
|
||||
pub(crate) fn get_u64(&self, doc: u64) -> Item {
|
||||
|
||||
@@ -700,17 +700,11 @@ impl IndexWriter {
|
||||
for (user_op, opstamp) in user_operations.into_iter().zip(stamps) {
|
||||
match user_op {
|
||||
UserOperation::Delete(term) => {
|
||||
let delete_operation = DeleteOperation {
|
||||
opstamp,
|
||||
term,
|
||||
};
|
||||
let delete_operation = DeleteOperation { opstamp, term };
|
||||
self.delete_queue.push(delete_operation);
|
||||
}
|
||||
UserOperation::Add(document) => {
|
||||
let add_operation = AddOperation {
|
||||
opstamp,
|
||||
document
|
||||
};
|
||||
let add_operation = AddOperation { opstamp, document };
|
||||
adds.push(add_operation);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ pub struct MultiFieldPostingsWriter {
|
||||
}
|
||||
|
||||
fn make_field_partition(
|
||||
term_offsets: &[(&[u8], Addr, UnorderedTermId)]
|
||||
term_offsets: &[(&[u8], Addr, UnorderedTermId)],
|
||||
) -> Vec<(Field, usize, usize)> {
|
||||
let term_offsets_it = term_offsets
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user