diff --git a/Cargo.toml b/Cargo.toml index b60e760dab..cb34078b0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,7 +43,7 @@ bitpacking = { version = "0.9.2", default-features = false, features = [ "bitpacker4x", ] } census = "0.4.2" -rustc-hash = "1.1.0" +rustc-hash = "2.0.0" thiserror = "1.0.30" htmlescape = "0.3.1" fail = { version = "0.5.0", optional = true } diff --git a/bitpacker/src/filter_vec/mod.rs b/bitpacker/src/filter_vec/mod.rs index 5a2ad64fbd..6cf67699aa 100644 --- a/bitpacker/src/filter_vec/mod.rs +++ b/bitpacker/src/filter_vec/mod.rs @@ -36,6 +36,7 @@ const IMPLS: [FilterImplPerInstructionSet; 1] = [FilterImplPerInstructionSet::Sc impl FilterImplPerInstructionSet { #[inline] + #[allow(unused_variables)] // on non-x86_64, code is unused. fn from(code: u8) -> FilterImplPerInstructionSet { #[cfg(target_arch = "x86_64")] if code == FilterImplPerInstructionSet::AVX2 as u8 { diff --git a/columnar/src/columnar/writer/column_operation.rs b/columnar/src/columnar/writer/column_operation.rs index 990e51a866..1297a0be94 100644 --- a/columnar/src/columnar/writer/column_operation.rs +++ b/columnar/src/columnar/writer/column_operation.rs @@ -122,7 +122,6 @@ impl From for ColumnOperation { // In order to limit memory usage, and in order // to benefit from the stacker, we do this by serialization our data // as "Symbols". -#[expect(clippy::from_over_into)] pub(super) trait SymbolValue: Clone + Copy { // Serializes the symbol into the given buffer. // Returns the number of bytes written into the buffer. diff --git a/common/src/lib.rs b/common/src/lib.rs index 519920c301..cbe13c9511 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -20,7 +20,7 @@ pub use datetime::{DateTime, DateTimePrecision}; pub use group_by::GroupByIteratorExtended; pub use json_path_writer::JsonPathWriter; pub use ownedbytes::{OwnedBytes, StableDeref}; -pub use serialize::*; +pub use serialize::{BinarySerializable, DeserializeFrom, FixedSize}; pub use vint::{ read_u32_vint, read_u32_vint_no_advance, serialize_vint_u32, write_u32_vint, VInt, VIntU128, }; @@ -134,7 +134,7 @@ pub(crate) mod test { use proptest::prelude::*; - use super::{f64_to_u64, i64_to_u64, u64_to_f64, u64_to_i64, BinarySerializable, FixedSize}; + use super::{f64_to_u64, i64_to_u64, u64_to_f64, u64_to_i64}; fn test_i64_converter_helper(val: i64) { assert_eq!(u64_to_i64(i64_to_u64(val)), val); @@ -144,12 +144,6 @@ pub(crate) mod test { assert_eq!(u64_to_f64(f64_to_u64(val)), val); } - pub(crate) fn fixed_size_test() { - let mut buffer = Vec::new(); - O::default().serialize(&mut buffer).unwrap(); - assert_eq!(buffer.len(), O::SIZE_IN_BYTES); - } - proptest! { #[test] fn test_f64_converter_monotonicity_proptest((left, right) in (proptest::num::f64::NORMAL, proptest::num::f64::NORMAL)) { diff --git a/src/aggregation/bucket/term_agg.rs b/src/aggregation/bucket/term_agg.rs index c2e235712b..56a0f181da 100644 --- a/src/aggregation/bucket/term_agg.rs +++ b/src/aggregation/bucket/term_agg.rs @@ -1232,8 +1232,8 @@ mod tests { #[test] fn terms_aggregation_min_doc_count_special_case() -> crate::Result<()> { let terms_per_segment = vec![ - vec!["terma", "terma", "termb", "termb", "termb", "termc"], - vec!["terma", "terma", "termb", "termc", "termc"], + vec!["terma", "terma", "termb", "termb", "termb"], + vec!["terma", "terma", "termb"], ]; let index = get_test_index_from_terms(false, &terms_per_segment)?; @@ -1255,8 +1255,6 @@ mod tests { assert_eq!(res["my_texts"]["buckets"][0]["doc_count"], 4); assert_eq!(res["my_texts"]["buckets"][1]["key"], "termb"); assert_eq!(res["my_texts"]["buckets"][1]["doc_count"], 0); - assert_eq!(res["my_texts"]["buckets"][2]["key"], "termc"); - assert_eq!(res["my_texts"]["buckets"][2]["doc_count"], 0); assert_eq!(res["my_texts"]["sum_other_doc_count"], 0); assert_eq!(res["my_texts"]["doc_count_error_upper_bound"], 0);