From 54d59ac7f410e4db6f89875a9054dde9220d8a6a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 07:02:12 +0000 Subject: [PATCH 1/2] Update halfbrown requirement from 0.3 to 0.4 Updates the requirements on [halfbrown](https://github.com/Licenser/halfbrown) to permit the latest version. - [Commits](https://github.com/Licenser/halfbrown/compare/v0.3.0...v0.4.0) --- updated-dependencies: - dependency-name: halfbrown dependency-version: 0.4.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fac2cc86..3054aeea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ simdutf8 = { version = "0.1.4", features = ["public_imp", "aarch64_neon"] } value-trait = { version = "0.11" } beef = { version = "0.5", optional = true } -halfbrown = "0.3" +halfbrown = "0.4" # ahash known key once_cell = { version = "1.21", optional = true } ahash = { version = "0.8", optional = true } From 18aad57c49e010f3afaaaef635ab97b42262ea08 Mon Sep 17 00:00:00 2001 From: "Heinz N. Gies" Date: Tue, 7 Oct 2025 11:07:39 +0200 Subject: [PATCH 2/2] cleanup Signed-off-by: Heinz N. Gies --- Cargo.toml | 2 +- src/impls/neon/stage1.rs | 2 +- src/macros.rs | 10 ---------- src/numberparse/approx.rs | 2 +- src/tests.rs | 2 +- src/tests/serde.rs | 3 +-- 6 files changed, 5 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 3054aeea..e6440d0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ rust-version = "1.88" [dependencies] simdutf8 = { version = "0.1.4", features = ["public_imp", "aarch64_neon"] } -value-trait = { version = "0.11" } +value-trait = { version = "0.12" } beef = { version = "0.5", optional = true } halfbrown = "0.4" # ahash known key diff --git a/src/impls/neon/stage1.rs b/src/impls/neon/stage1.rs index 0401ee33..fc8ac700 100644 --- a/src/impls/neon/stage1.rs +++ b/src/impls/neon/stage1.rs @@ -204,7 +204,7 @@ impl Stage1Parse for SimdInput { base.reserve(64); let final_len = l + cnt; - let is_unaligned = l % 4 != 0; + let is_unaligned = !l.is_multiple_of(4); let write_fn = if is_unaligned { std::ptr::write_unaligned } else { diff --git a/src/macros.rs b/src/macros.rs index d1691902..93bf572b 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -1248,16 +1248,6 @@ macro_rules! static_cast_i64 { } pub(crate) use static_cast_i64; -/// static cast to an i64 -#[cfg(all(feature = "approx-number-parsing", feature = "i128"))] -macro_rules! static_cast_i128 { - ($v:expr_2021) => { - ::std::mem::transmute::<_, i128>($v) - }; -} -#[cfg(all(feature = "approx-number-parsing", feature = "i128"))] -pub(crate) use static_cast_i128; - /// static cast to an u64 macro_rules! static_cast_u64 { ($v:expr_2021) => { diff --git a/src/numberparse/approx.rs b/src/numberparse/approx.rs index 61113ecb..be283407 100644 --- a/src/numberparse/approx.rs +++ b/src/numberparse/approx.rs @@ -336,7 +336,7 @@ impl Deserializer<'_> { ErrorType::InvalidNumber, )) } else if negative { - let i = unsafe { static_cast_i128!(i.wrapping_neg()) }; + let i: i128 = i.wrapping_neg().cast_signed(); if let Ok(i) = i64::try_from(i) { Ok(StaticNode::I64(i)) } else { diff --git a/src/tests.rs b/src/tests.rs index 9d1ccc0a..4ef3597c 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -166,7 +166,7 @@ fn silly_float1() { } #[test] -#[ignore] +#[ignore = "serde is less precise on this test"] fn silly_float2() { let v = Value::from(-6.990_585_694_841_803e305); let s = v.encode(); diff --git a/src/tests/serde.rs b/src/tests/serde.rs index 5abf4a79..fdb1f042 100644 --- a/src/tests/serde.rs +++ b/src/tests/serde.rs @@ -585,8 +585,7 @@ fn float1() { assert_eq!(v_simd, v_serde); } -// We ignore this since serde is less precise on this test -#[ignore] +#[ignore = "We ignore this since serde is less precise on this test"] #[test] fn float2() { let mut d = String::from("-4.5512678569607477e306");