@@ -2775,7 +2775,11 @@ where
2775
2775
where
2776
2776
V : Visitor < ' de > ,
2777
2777
{
2778
- visitor. visit_map ( FlatMapAccess :: new ( self . 0 . iter ( ) ) )
2778
+ visitor. visit_map ( FlatMapAccess {
2779
+ iter : self . 0 . iter ( ) ,
2780
+ pending_content : None ,
2781
+ _marker : PhantomData ,
2782
+ } )
2779
2783
}
2780
2784
2781
2785
fn deserialize_struct < V > (
@@ -2787,7 +2791,12 @@ where
2787
2791
where
2788
2792
V : Visitor < ' de > ,
2789
2793
{
2790
- visitor. visit_map ( FlatStructAccess :: new ( self . 0 . iter_mut ( ) , fields) )
2794
+ visitor. visit_map ( FlatStructAccess {
2795
+ iter : self . 0 . iter_mut ( ) ,
2796
+ pending_content : None ,
2797
+ fields : fields,
2798
+ _marker : PhantomData ,
2799
+ } )
2791
2800
}
2792
2801
2793
2802
fn deserialize_newtype_struct < V > ( self , _name : & str , visitor : V ) -> Result < V :: Value , Self :: Error >
@@ -2847,19 +2856,6 @@ struct FlatMapAccess<'a, 'de: 'a, E> {
2847
2856
_marker : PhantomData < E > ,
2848
2857
}
2849
2858
2850
- #[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
2851
- impl < ' a , ' de , E > FlatMapAccess < ' a , ' de , E > {
2852
- fn new (
2853
- iter : slice:: Iter < ' a , Option < ( Content < ' de > , Content < ' de > ) > > ,
2854
- ) -> FlatMapAccess < ' a , ' de , E > {
2855
- FlatMapAccess {
2856
- iter : iter,
2857
- pending_content : None ,
2858
- _marker : PhantomData ,
2859
- }
2860
- }
2861
- }
2862
-
2863
2859
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
2864
2860
impl < ' a , ' de , E > MapAccess < ' de > for FlatMapAccess < ' a , ' de , E >
2865
2861
where
@@ -2904,21 +2900,6 @@ struct FlatStructAccess<'a, 'de: 'a, E> {
2904
2900
_marker : PhantomData < E > ,
2905
2901
}
2906
2902
2907
- #[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
2908
- impl < ' a , ' de , E > FlatStructAccess < ' a , ' de , E > {
2909
- fn new (
2910
- iter : slice:: IterMut < ' a , Option < ( Content < ' de > , Content < ' de > ) > > ,
2911
- fields : & ' static [ & ' static str ] ,
2912
- ) -> FlatStructAccess < ' a , ' de , E > {
2913
- FlatStructAccess {
2914
- iter : iter,
2915
- pending_content : None ,
2916
- fields : fields,
2917
- _marker : PhantomData ,
2918
- }
2919
- }
2920
- }
2921
-
2922
2903
#[ cfg( any( feature = "std" , feature = "alloc" ) ) ]
2923
2904
impl < ' a , ' de , E > MapAccess < ' de > for FlatStructAccess < ' a , ' de , E >
2924
2905
where
0 commit comments