Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lexical-core requirement from 0.8 to 1.0 (to resolve RUSTSEC-2023-0086) #6402

Merged
merged 2 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arrow-cast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 1 addition & 3 deletions arrow-cast/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -421,9 +421,7 @@ macro_rules! primitive_display {
fn write(&self, idx: usize, f: &mut dyn Write) -> FormatResult {
let value = self.value(idx);
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);
Copy link
Contributor

@Dandandan Dandandan Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Safety comment above this can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with 481883d

// Lexical core produces valid UTF-8
let s = unsafe { std::str::from_utf8_unchecked(b) };
f.write_str(s)?;
Expand Down
2 changes: 1 addition & 1 deletion arrow-csv/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion arrow-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading