Skip to content

Commit 7577fff

Browse files
committed
remove lexical-core dependency
Signed-off-by: Heinz N. Gies <heinz@licenser.net>
1 parent 19ddf6c commit 7577fff

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ getrandom = { version = "0.2", features = ["js"] }
1717
[dependencies]
1818
simdutf8 = { version = "0.1.4", features = ["public_imp", "aarch64_neon"] }
1919

20-
lexical-core = { version = "0.8", features = ["format"] }
2120
beef = { version = "0.5", optional = true }
2221
halfbrown = "0.2"
2322
value-trait = { version = "0.9.0-rc.1" }

src/numberparse/correct.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,10 +381,9 @@ fn f64_from_parts(
381381

382382
#[cold]
383383
fn f64_from_parts_slow(slice: &[u8], offset: usize) -> Result<StaticNode> {
384-
match lexical_core::parse_with_options::<f64, { lexical_core::format::JSON }>(
385-
slice,
386-
&lexical_core::parse_float_options::JSON,
387-
) {
384+
// we already validated the content of the slice we only need to translate
385+
// the slice to a string and parse it as parse is not defined for a u8 slice
386+
match unsafe { std::str::from_utf8_unchecked(slice).parse::<f64>() } {
388387
Ok(val) => {
389388
if val.is_infinite() {
390389
err!(offset, get!(slice, 0))

0 commit comments

Comments
 (0)