From a46cdf2fcf0df5987755237670ce7c239f104b07 Mon Sep 17 00:00:00 2001 From: Dario Curreri Date: Mon, 16 Sep 2024 17:44:08 +0200 Subject: [PATCH] Update lexical-core requirement from 0.8 to 1.0 --- arrow-cast/Cargo.toml | 2 +- arrow-cast/src/display.rs | 2 +- arrow-csv/Cargo.toml | 2 +- arrow-json/Cargo.toml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arrow-cast/Cargo.toml b/arrow-cast/Cargo.toml index 86f1a431a8b2..4046f5226094 100644 --- a/arrow-cast/Cargo.toml +++ b/arrow-cast/Cargo.toml @@ -49,7 +49,7 @@ arrow-select = { workspace = true } chrono = { workspace = true } half = { version = "2.1", default-features = false } num = { version = "0.4", default-features = false, features = ["std"] } -lexical-core = { version = "^0.8", default-features = false, features = ["write-integers", "write-floats", "parse-integers", "parse-floats"] } +lexical-core = { version = "1.0", default-features = false, features = ["write-integers", "write-floats", "parse-integers", "parse-floats"] } atoi = "2.0.0" comfy-table = { version = "7.0", optional = true, default-features = false } base64 = "0.22" diff --git a/arrow-cast/src/display.rs b/arrow-cast/src/display.rs index 312e7973963e..ba06955a5663 100644 --- a/arrow-cast/src/display.rs +++ b/arrow-cast/src/display.rs @@ -423,7 +423,7 @@ macro_rules! primitive_display { let mut buffer = [0u8; <$t as ArrowPrimitiveType>::Native::FORMATTED_SIZE]; // SAFETY: // buffer is T::FORMATTED_SIZE - let b = unsafe { lexical_core::write_unchecked(value, &mut buffer) }; + let b = lexical_core::write(value, &mut buffer); // Lexical core produces valid UTF-8 let s = unsafe { std::str::from_utf8_unchecked(b) }; f.write_str(s)?; diff --git a/arrow-csv/Cargo.toml b/arrow-csv/Cargo.toml index d29c85c56cfd..be213c9363c2 100644 --- a/arrow-csv/Cargo.toml +++ b/arrow-csv/Cargo.toml @@ -43,7 +43,7 @@ chrono = { workspace = true } csv = { version = "1.1", default-features = false } csv-core = { version = "0.1" } lazy_static = { version = "1.4", default-features = false } -lexical-core = { version = "^0.8", default-features = false } +lexical-core = { version = "1.0", default-features = false } regex = { version = "1.7.0", default-features = false, features = ["std", "unicode", "perf"] } [dev-dependencies] diff --git a/arrow-json/Cargo.toml b/arrow-json/Cargo.toml index dd232f197ead..517bb03d2064 100644 --- a/arrow-json/Cargo.toml +++ b/arrow-json/Cargo.toml @@ -45,7 +45,7 @@ num = { version = "0.4", default-features = false, features = ["std"] } serde = { version = "1.0", default-features = false } serde_json = { version = "1.0", default-features = false, features = ["std"] } chrono = { workspace = true } -lexical-core = { version = "0.8", default-features = false } +lexical-core = { version = "1.0", default-features = false} [dev-dependencies] tempfile = "3.3"