File tree Expand file tree Collapse file tree 6 files changed +5
-16
lines changed
Expand file tree Collapse file tree 6 files changed +5
-16
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ rust-version = "1.88"
1414[dependencies ]
1515simdutf8 = { version = " 0.1.4" , features = [" public_imp" , " aarch64_neon" ] }
1616
17- value-trait = { version = " 0.11 " }
17+ value-trait = { version = " 0.12 " }
1818beef = { version = " 0.5" , optional = true }
1919halfbrown = " 0.4"
2020# ahash known key
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff line change @@ -1248,16 +1248,6 @@ macro_rules! static_cast_i64 {
12481248}
12491249pub ( 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
12621252macro_rules! static_cast_u64 {
12631253 ( $v: expr_2021) => {
Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ fn silly_float1() {
166166}
167167
168168#[ test]
169- #[ ignore]
169+ #[ ignore = "serde is less precise on this test" ]
170170fn silly_float2 ( ) {
171171 let v = Value :: from ( -6.990_585_694_841_803e305 ) ;
172172 let s = v. encode ( ) ;
Original file line number Diff line number Diff 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]
591590fn float2 ( ) {
592591 let mut d = String :: from ( "-4.5512678569607477e306" ) ;
You can’t perform that action at this time.
0 commit comments