diff --git a/common/src/vint.rs b/common/src/vint.rs index 393f89ef9..444d7b175 100644 --- a/common/src/vint.rs +++ b/common/src/vint.rs @@ -29,6 +29,7 @@ impl BinarySerializable for VIntU128 { } fn deserialize(reader: &mut R) -> io::Result { + #[allow(clippy::unbuffered_bytes)] let mut bytes = reader.bytes(); let mut result = 0u128; 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)] pub struct VInt(pub u64); @@ -196,6 +197,7 @@ impl BinarySerializable for VInt { } fn deserialize(reader: &mut R) -> io::Result { + #[allow(clippy::unbuffered_bytes)] let mut bytes = reader.bytes(); let mut result = 0u64; let mut shift = 0u64; diff --git a/src/query/term_query/term_query.rs b/src/query/term_query/term_query.rs index 648dd9ed6..dae6d7fe7 100644 --- a/src/query/term_query/term_query.rs +++ b/src/query/term_query/term_query.rs @@ -101,7 +101,7 @@ impl TermQuery { EnableScoring::Enabled { statistics_provider, .. - } => Bm25Weight::for_terms(statistics_provider, &[self.term.clone()])?, + } => Bm25Weight::for_terms(statistics_provider, std::slice::from_ref(&self.term))?, EnableScoring::Disabled { .. } => { Bm25Weight::new(Explanation::new("", 1.0f32), 1.0f32) }