Skip to content

Commit 7f45f7c

Browse files
committed
cleanup
Signed-off-by: Heinz N. Gies <[email protected]>
1 parent 1f11e82 commit 7f45f7c

File tree

6 files changed

+5
-16
lines changed

6 files changed

+5
-16
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rust-version = "1.88"
1414
[dependencies]
1515
simdutf8 = { version = "0.1.4", features = ["public_imp", "aarch64_neon"] }
1616

17-
value-trait = { version = "0.11" }
17+
value-trait = { version = "0.12" }
1818
beef = { version = "0.5", optional = true }
1919
halfbrown = "0.4"
2020
# ahash known key

src/impls/neon/stage1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl Stage1Parse for SimdInput {
204204
base.reserve(64);
205205
let final_len = l + cnt;
206206

207-
let is_unaligned = l % 4 != 0;
207+
let is_unaligned = !l.is_multiple_of(4);
208208
let write_fn = if is_unaligned {
209209
std::ptr::write_unaligned
210210
} else {

src/macros.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,16 +1248,6 @@ macro_rules! static_cast_i64 {
12481248
}
12491249
pub(crate) use static_cast_i64;
12501250

1251-
/// static cast to an i64
1252-
#[cfg(all(feature = "approx-number-parsing", feature = "i128"))]
1253-
macro_rules! static_cast_i128 {
1254-
($v:expr_2021) => {
1255-
::std::mem::transmute::<_, i128>($v)
1256-
};
1257-
}
1258-
#[cfg(all(feature = "approx-number-parsing", feature = "i128"))]
1259-
pub(crate) use static_cast_i128;
1260-
12611251
/// static cast to an u64
12621252
macro_rules! static_cast_u64 {
12631253
($v:expr_2021) => {

src/numberparse/approx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ impl Deserializer<'_> {
336336
ErrorType::InvalidNumber,
337337
))
338338
} else if negative {
339-
let i = unsafe { static_cast_i128!(i.wrapping_neg()) };
339+
let i: i128 = i.wrapping_neg().cast_signed();
340340
if let Ok(i) = i64::try_from(i) {
341341
Ok(StaticNode::I64(i))
342342
} else {

src/tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ fn silly_float1() {
166166
}
167167

168168
#[test]
169-
#[ignore]
169+
#[ignore = "serde is less precise on this test"]
170170
fn silly_float2() {
171171
let v = Value::from(-6.990_585_694_841_803e305);
172172
let s = v.encode();

src/tests/serde.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,7 @@ fn float1() {
585585
assert_eq!(v_simd, v_serde);
586586
}
587587

588-
// We ignore this since serde is less precise on this test
589-
#[ignore]
588+
#[ignore = "We ignore this since serde is less precise on this test"]
590589
#[test]
591590
fn float2() {
592591
let mut d = String::from("-4.5512678569607477e306");

0 commit comments

Comments
 (0)