@@ -3467,7 +3467,7 @@ mod tests {
34673467 let mut map = HashMap :: new ( ) ;
34683468 map. insert ( Enum :: Foo , 0 ) ;
34693469 let result = json:: encode ( & map) . unwrap ( ) ;
3470- assert_eq ! ( & result[ ] , r#"{"Foo":0}"# ) ;
3470+ assert_eq ! ( result, r#"{"Foo":0}"# ) ;
34713471 let decoded: HashMap < Enum , _ > = json:: decode ( & result) . unwrap ( ) ;
34723472 assert_eq ! ( map, decoded) ;
34733473 }
@@ -3790,12 +3790,12 @@ mod tests {
37903790
37913791 assert_eq ! ( array2. to_json( ) , array2) ;
37923792 assert_eq ! ( object. to_json( ) , object) ;
3793- assert_eq ! ( 3_ is . to_json( ) , I64 ( 3 ) ) ;
3793+ assert_eq ! ( 3_isize . to_json( ) , I64 ( 3 ) ) ;
37943794 assert_eq ! ( 4_i8 . to_json( ) , I64 ( 4 ) ) ;
37953795 assert_eq ! ( 5_i16 . to_json( ) , I64 ( 5 ) ) ;
37963796 assert_eq ! ( 6_i32 . to_json( ) , I64 ( 6 ) ) ;
37973797 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 ) ) ;
37993799 assert_eq ! ( 9_u8 . to_json( ) , U64 ( 9 ) ) ;
38003800 assert_eq ! ( 10_u16 . to_json( ) , U64 ( 10 ) ) ;
38013801 assert_eq ! ( 11_u32 . to_json( ) , U64 ( 11 ) ) ;
@@ -3809,22 +3809,22 @@ mod tests {
38093809 assert_eq ! ( false . to_json( ) , Boolean ( false ) ) ;
38103810 assert_eq ! ( "abc" . to_json( ) , String ( "abc" . to_string( ) ) ) ;
38113811 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) ;
38183818 let mut tree_map = BTreeMap :: new ( ) ;
3819- tree_map. insert ( "a" . to_string ( ) , 1 us ) ;
3819+ tree_map. insert ( "a" . to_string ( ) , 1 ) ;
38203820 tree_map. insert ( "b" . to_string ( ) , 2 ) ;
38213821 assert_eq ! ( tree_map. to_json( ) , object) ;
38223822 let mut hash_map = HashMap :: new ( ) ;
3823- hash_map. insert ( "a" . to_string ( ) , 1 us ) ;
3823+ hash_map. insert ( "a" . to_string ( ) , 1 ) ;
38243824 hash_map. insert ( "b" . to_string ( ) , 2 ) ;
38253825 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 ) ) ;
38283828 assert_eq ! ( None :: <isize >. to_json( ) , Null ) ;
38293829 }
38303830
0 commit comments