Cargo fmt

This commit is contained in:
Paul Masurel
2019-03-06 10:31:00 +09:00
parent f5c65f1f60
commit e67883138d
5 changed files with 7 additions and 12 deletions

View File

@@ -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

View File

@@ -80,7 +80,7 @@ where
(1u64 << num_bits) - 1u64
};
BitUnpacker {
num_bits: u64::from(num_bits) ,
num_bits: u64::from(num_bits),
mask,
data,
}

View File

@@ -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 {

View File

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

View File

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