mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2025-12-23 02:29:57 +00:00
Clippy
This commit is contained in:
@@ -101,7 +101,7 @@ impl BitUnpacker {
|
|||||||
.try_into()
|
.try_into()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let val_unshifted_unmasked: u64 = u64::from_le_bytes(bytes);
|
let val_unshifted_unmasked: u64 = u64::from_le_bytes(bytes);
|
||||||
let val_shifted = (val_unshifted_unmasked >> bit_shift);
|
let val_shifted = val_unshifted_unmasked >> bit_shift;
|
||||||
val_shifted & self.mask
|
val_shifted & self.mask
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ fn deserialize_sparse_codec_block(data: &OwnedBytes) -> Vec<SparseCodecBlockVari
|
|||||||
// The number of vals so far
|
// The number of vals so far
|
||||||
let mut offset = 0;
|
let mut offset = 0;
|
||||||
let mut sparse_codec_blocks = Vec::new();
|
let mut sparse_codec_blocks = Vec::new();
|
||||||
let num_blocks = get_u16(&data, data.len() - 2);
|
let num_blocks = get_u16(data, data.len() - 2);
|
||||||
let block_data_index_start =
|
let block_data_index_start =
|
||||||
data.len() - 2 - num_blocks as usize * SERIALIZED_BLOCK_METADATA_SIZE;
|
data.len() - 2 - num_blocks as usize * SERIALIZED_BLOCK_METADATA_SIZE;
|
||||||
let mut byte_start = 0;
|
let mut byte_start = 0;
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ impl VecCursor {
|
|||||||
}
|
}
|
||||||
#[inline]
|
#[inline]
|
||||||
fn current(&self) -> Option<u32> {
|
fn current(&self) -> Option<u32> {
|
||||||
self.docs.get(self.current_pos).map(|el| *el)
|
self.docs.get(self.current_pos).copied()
|
||||||
}
|
}
|
||||||
fn get_cleared_data(&mut self) -> &mut Vec<u32> {
|
fn get_cleared_data(&mut self) -> &mut Vec<u32> {
|
||||||
self.docs.clear();
|
self.docs.clear();
|
||||||
@@ -280,10 +280,7 @@ impl DocSet for IpRangeDocSet {
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn doc(&self) -> DocId {
|
fn doc(&self) -> DocId {
|
||||||
self.loaded_docs
|
self.loaded_docs.current().unwrap_or(TERMINATED)
|
||||||
.current()
|
|
||||||
.map(|el| el)
|
|
||||||
.unwrap_or(TERMINATED)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Advances the `DocSet` forward until reaching the target, or going to the
|
/// Advances the `DocSet` forward until reaching the target, or going to the
|
||||||
|
|||||||
Reference in New Issue
Block a user