@@ -3467,7 +3467,7 @@ mod tests {
3467
3467
let mut map = HashMap :: new ( ) ;
3468
3468
map. insert ( Enum :: Foo , 0 ) ;
3469
3469
let result = json:: encode ( & map) . unwrap ( ) ;
3470
- assert_eq ! ( & result[ ] , r#"{"Foo":0}"# ) ;
3470
+ assert_eq ! ( result, r#"{"Foo":0}"# ) ;
3471
3471
let decoded: HashMap < Enum , _ > = json:: decode ( & result) . unwrap ( ) ;
3472
3472
assert_eq ! ( map, decoded) ;
3473
3473
}
@@ -3790,12 +3790,12 @@ mod tests {
3790
3790
3791
3791
assert_eq ! ( array2. to_json( ) , array2) ;
3792
3792
assert_eq ! ( object. to_json( ) , object) ;
3793
- assert_eq ! ( 3_ is . to_json( ) , I64 ( 3 ) ) ;
3793
+ assert_eq ! ( 3_isize . to_json( ) , I64 ( 3 ) ) ;
3794
3794
assert_eq ! ( 4_i8 . to_json( ) , I64 ( 4 ) ) ;
3795
3795
assert_eq ! ( 5_i16 . to_json( ) , I64 ( 5 ) ) ;
3796
3796
assert_eq ! ( 6_i32 . to_json( ) , I64 ( 6 ) ) ;
3797
3797
assert_eq ! ( 7_i64 . to_json( ) , I64 ( 7 ) ) ;
3798
- assert_eq ! ( 8_ us . to_json( ) , U64 ( 8 ) ) ;
3798
+ assert_eq ! ( 8_usize . to_json( ) , U64 ( 8 ) ) ;
3799
3799
assert_eq ! ( 9_u8 . to_json( ) , U64 ( 9 ) ) ;
3800
3800
assert_eq ! ( 10_u16 . to_json( ) , U64 ( 10 ) ) ;
3801
3801
assert_eq ! ( 11_u32 . to_json( ) , U64 ( 11 ) ) ;
@@ -3809,22 +3809,22 @@ mod tests {
3809
3809
assert_eq ! ( false . to_json( ) , Boolean ( false ) ) ;
3810
3810
assert_eq ! ( "abc" . to_json( ) , String ( "abc" . to_string( ) ) ) ;
3811
3811
assert_eq ! ( "abc" . to_string( ) . to_json( ) , String ( "abc" . to_string( ) ) ) ;
3812
- assert_eq ! ( ( 1 us , 2 us ) . to_json( ) , array2) ;
3813
- assert_eq ! ( ( 1 us , 2 us , 3 us ) . to_json( ) , array3) ;
3814
- assert_eq ! ( [ 1 us , 2 us ] . to_json( ) , array2) ;
3815
- assert_eq ! ( ( & [ 1 us , 2 us , 3 us ] ) . to_json( ) , array3) ;
3816
- assert_eq ! ( ( vec![ 1 us , 2 ] ) . to_json( ) , array2) ;
3817
- assert_eq ! ( vec!( 1 us , 2 , 3 ) . to_json( ) , array3) ;
3812
+ assert_eq ! ( ( 1 , 2 ) . to_json( ) , array2) ;
3813
+ assert_eq ! ( ( 1 , 2 , 3 ) . to_json( ) , array3) ;
3814
+ assert_eq ! ( [ 1 , 2 ] . to_json( ) , array2) ;
3815
+ assert_eq ! ( ( & [ 1 , 2 , 3 ] ) . to_json( ) , array3) ;
3816
+ assert_eq ! ( ( vec![ 1 , 2 ] ) . to_json( ) , array2) ;
3817
+ assert_eq ! ( vec!( 1 , 2 , 3 ) . to_json( ) , array3) ;
3818
3818
let mut tree_map = BTreeMap :: new ( ) ;
3819
- tree_map. insert ( "a" . to_string ( ) , 1 us ) ;
3819
+ tree_map. insert ( "a" . to_string ( ) , 1 ) ;
3820
3820
tree_map. insert ( "b" . to_string ( ) , 2 ) ;
3821
3821
assert_eq ! ( tree_map. to_json( ) , object) ;
3822
3822
let mut hash_map = HashMap :: new ( ) ;
3823
- hash_map. insert ( "a" . to_string ( ) , 1 us ) ;
3823
+ hash_map. insert ( "a" . to_string ( ) , 1 ) ;
3824
3824
hash_map. insert ( "b" . to_string ( ) , 2 ) ;
3825
3825
assert_eq ! ( hash_map. to_json( ) , object) ;
3826
- assert_eq ! ( Some ( 15 is ) . to_json( ) , I64 ( 15 ) ) ;
3827
- assert_eq ! ( Some ( 15 us ) . to_json( ) , U64 ( 15 ) ) ;
3826
+ assert_eq ! ( Some ( 15 ) . to_json( ) , I64 ( 15 ) ) ;
3827
+ assert_eq ! ( Some ( 15 ) . to_json( ) , U64 ( 15 ) ) ;
3828
3828
assert_eq ! ( None :: <isize >. to_json( ) , Null ) ;
3829
3829
}
3830
3830
0 commit comments