This commit is contained in:
Paul Masurel
2025-10-08 17:07:07 +02:00
parent 270ca5123c
commit ebb82dc549
2 changed files with 4 additions and 2 deletions

View File

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

View File

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