From 82494a33b03d3d93a5f42c9b633f7f9d37dff17f Mon Sep 17 00:00:00 2001 From: Ryan Fairfax Date: Wed, 18 Sep 2024 09:53:40 -0700 Subject: [PATCH] fix(core): Support Rust 1.78 Add a qualifier to imports to support slightly older Rust versions. Tag cargo metadata with min tested version to give a better error. --- core/src/rust/filodb_core/Cargo.toml | 1 + core/src/rust/tantivy_utils/Cargo.toml | 1 + .../tantivy_utils/src/collectors/part_key_record_collector.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/core/src/rust/filodb_core/Cargo.toml b/core/src/rust/filodb_core/Cargo.toml index 7ca4847457..10f86f6c61 100644 --- a/core/src/rust/filodb_core/Cargo.toml +++ b/core/src/rust/filodb_core/Cargo.toml @@ -2,6 +2,7 @@ name = "filodb_core" version = "0.1.0" edition = "2021" +rust-version = "1.78" [lib] crate-type = ["cdylib"] diff --git a/core/src/rust/tantivy_utils/Cargo.toml b/core/src/rust/tantivy_utils/Cargo.toml index f0ad238872..6491e78e98 100644 --- a/core/src/rust/tantivy_utils/Cargo.toml +++ b/core/src/rust/tantivy_utils/Cargo.toml @@ -2,6 +2,7 @@ name = "tantivy_utils" version = "0.1.0" edition = "2021" +rust-version = "1.78" [dependencies] hashbrown = "0.14.5" diff --git a/core/src/rust/tantivy_utils/src/collectors/part_key_record_collector.rs b/core/src/rust/tantivy_utils/src/collectors/part_key_record_collector.rs index a6e64c9cc6..65b1033190 100644 --- a/core/src/rust/tantivy_utils/src/collectors/part_key_record_collector.rs +++ b/core/src/rust/tantivy_utils/src/collectors/part_key_record_collector.rs @@ -1,6 +1,7 @@ //! Collector for part key binary data use std::cmp::min; +use std::mem::size_of; use crate::collectors::column_cache::ColumnCache; use crate::field_constants::{END_TIME, PART_KEY, START_TIME};