mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2025-12-23 02:29:57 +00:00
clippy
This commit is contained in:
@@ -29,6 +29,7 @@ impl BinarySerializable for VIntU128 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize<R: Read>(reader: &mut R) -> io::Result<Self> {
|
fn deserialize<R: Read>(reader: &mut R) -> io::Result<Self> {
|
||||||
|
#[allow(clippy::unbuffered_bytes)]
|
||||||
let mut bytes = reader.bytes();
|
let mut bytes = reader.bytes();
|
||||||
let mut result = 0u128;
|
let mut result = 0u128;
|
||||||
let mut shift = 0u64;
|
let mut shift = 0u64;
|
||||||
@@ -52,7 +53,7 @@ impl BinarySerializable for VIntU128 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Wrapper over a `u64` that serializes as a variable int.
|
/// Wrapper over a `u64` that serializes as a variable int.
|
||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||||
pub struct VInt(pub u64);
|
pub struct VInt(pub u64);
|
||||||
|
|
||||||
@@ -196,6 +197,7 @@ impl BinarySerializable for VInt {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize<R: Read>(reader: &mut R) -> io::Result<Self> {
|
fn deserialize<R: Read>(reader: &mut R) -> io::Result<Self> {
|
||||||
|
#[allow(clippy::unbuffered_bytes)]
|
||||||
let mut bytes = reader.bytes();
|
let mut bytes = reader.bytes();
|
||||||
let mut result = 0u64;
|
let mut result = 0u64;
|
||||||
let mut shift = 0u64;
|
let mut shift = 0u64;
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ impl TermQuery {
|
|||||||
EnableScoring::Enabled {
|
EnableScoring::Enabled {
|
||||||
statistics_provider,
|
statistics_provider,
|
||||||
..
|
..
|
||||||
} => Bm25Weight::for_terms(statistics_provider, &[self.term.clone()])?,
|
} => Bm25Weight::for_terms(statistics_provider, std::slice::from_ref(&self.term))?,
|
||||||
EnableScoring::Disabled { .. } => {
|
EnableScoring::Disabled { .. } => {
|
||||||
Bm25Weight::new(Explanation::new("<no score>", 1.0f32), 1.0f32)
|
Bm25Weight::new(Explanation::new("<no score>", 1.0f32), 1.0f32)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user