diff --git a/encodings/alp/src/alp/compress.rs b/encodings/alp/src/alp/compress.rs index acfefc1c7fe..618ab5ca261 100644 --- a/encodings/alp/src/alp/compress.rs +++ b/encodings/alp/src/alp/compress.rs @@ -150,12 +150,12 @@ where #[cfg(test)] mod tests { - use core::f32; - use core::f64; + use std::f32::consts::E as E_F32; + use std::f32::consts::PI as PI_F32; + use std::f64::consts::E; + use std::f64::consts::PI; use std::sync::LazyLock; - use f64::consts::E; - use f64::consts::PI; use vortex_array::VortexSessionExecute; use vortex_array::assert_arrays_eq; use vortex_array::dtype::NativePType; @@ -564,8 +564,8 @@ mod tests { fn test_large_f32_array_with_patches() { let size = 5_000; let mut values = vec![1.5f32; size]; - values[100] = f32::consts::PI; - values[1500] = f32::consts::E; + values[100] = PI_F32; + values[1500] = E_F32; values[3000] = f32::NEG_INFINITY; values[4500] = f32::INFINITY; diff --git a/encodings/alp/src/alp/compute/compare.rs b/encodings/alp/src/alp/compute/compare.rs index 8e59fb23f7c..83044e22023 100644 --- a/encodings/alp/src/alp/compute/compare.rs +++ b/encodings/alp/src/alp/compute/compare.rs @@ -150,7 +150,7 @@ where #[cfg(test)] mod tests { - use std::f32; + use std::f32::consts::E; use std::sync::LazyLock; use rstest::rstest; @@ -330,7 +330,7 @@ mod tests { #[test] fn compare_with_patches() { - let array = PrimitiveArray::from_iter([1.234f32, 1.5, 19.0, f32::consts::E, 1_000_000.9]); + let array = PrimitiveArray::from_iter([1.234f32, 1.5, 19.0, E, 1_000_000.9]); let encoded = alp_encode(array.as_view(), None, &mut SESSION.create_execution_ctx()).unwrap(); assert!(encoded.patches().is_some()); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 7e14eac1671..051b8fa5930 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.98.0" +channel = "1.99.1" components = ["rust-src", "rustfmt", "clippy", "rust-analyzer"] profile = "minimal" diff --git a/vortex-layout/src/scan/limit.rs b/vortex-layout/src/scan/limit.rs index ce5a60977de..e7791e5961f 100644 --- a/vortex-layout/src/scan/limit.rs +++ b/vortex-layout/src/scan/limit.rs @@ -61,7 +61,7 @@ impl RowLimit { fn reserve(&self, requested: u64) -> u64 { let remaining = self .0 - .fetch_update(Ordering::Relaxed, Ordering::Relaxed, |remaining| { + .try_update(Ordering::Relaxed, Ordering::Relaxed, |remaining| { Some(remaining.saturating_sub(requested)) }) .ok() diff --git a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/alp.rs b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/alp.rs index 2fd31885921..6e654f39a95 100644 --- a/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/alp.rs +++ b/vortex-test/compat-gen/src/fixtures/arrays/synthetic/encodings/alp.rs @@ -1,7 +1,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-FileCopyrightText: Copyright the Vortex contributors -use std::f64; +use std::f64::consts::E; +use std::f64::consts::PI; use vortex::array::ArrayId; use vortex::array::ArrayRef; @@ -75,7 +76,7 @@ impl FlatLayoutFixture for AlpFixture { let f64_patched: PrimitiveArray = (0..N) .map(|i| { if i % 100 == 0 { - f64::consts::PI * (i as f64 + 1.0) + PI * (i as f64 + 1.0) } else { (i as f64) * 0.01 } @@ -100,8 +101,8 @@ impl FlatLayoutFixture for AlpFixture { 3 => -f64::EPSILON, 4 => f64::MIN_POSITIVE, 5 => -f64::MIN_POSITIVE, - 6 => f64::consts::PI, - 7 => -f64::consts::E, + 6 => PI, + 7 => -E, 8 => f64::from_bits(1), _ => -f64::from_bits(2), }) diff --git a/vortex/src/lib.rs b/vortex/src/lib.rs index 9df15319272..573e929d036 100644 --- a/vortex/src/lib.rs +++ b/vortex/src/lib.rs @@ -17,7 +17,7 @@ //! sources/sinks. //! - [`compressor`] contains the default BtrBlocks-style adaptive compressor. //! - [`encodings`] exposes maintained encoding crates such as FastLanes, Pco, and Zstd. -//! - [`session`] contains [`VortexSession`](session::VortexSession), the registry container used to +//! - [`session`] contains [`VortexSession`], the registry container used to //! make array, layout, scalar-function, and runtime plugins available. //! //! Most applications should create a default session with [`VortexSessionDefault`]. Lower-level