@@ -176,32 +176,17 @@ impl<'de> SeqAccess<'de> for ArrayRef<'de> {
176176 }
177177}
178178
179- #[ cfg( not( feature = "preserve_order" ) ) ]
180179struct ObjectAccess < ' de , const N : usize = 32 > {
181180 i : halfbrown:: IntoIter < Cow < ' de , str > , Value < ' de > , N > ,
182181 v : Option < Value < ' de > > ,
183182}
184183
185- #[ cfg( feature = "preserve_order" ) ]
186- struct ObjectAccess < ' de > {
187- i : indexmap:: map:: IntoIter < Cow < ' de , str > , Value < ' de > > ,
188- v : Option < Value < ' de > > ,
189- }
190-
191- #[ cfg( not( feature = "preserve_order" ) ) ]
192184impl < ' de , const N : usize > ObjectAccess < ' de , N > {
193185 fn new ( i : halfbrown:: IntoIter < Cow < ' de , str > , Value < ' de > , N > ) -> Self {
194186 Self { i, v : None }
195187 }
196188}
197189
198- #[ cfg( feature = "preserve_order" ) ]
199- impl < ' de > ObjectAccess < ' de > {
200- fn new ( i : indexmap:: map:: IntoIter < Cow < ' de , str > , Value < ' de > > ) -> Self {
201- Self { i, v : None }
202- }
203- }
204-
205190// `MapAccess` is provided to the `Visitor` to give it the ability to iterate
206191// through entries of the map.
207192impl < ' de > MapAccess < ' de > for ObjectAccess < ' de > {
@@ -231,32 +216,17 @@ impl<'de> MapAccess<'de> for ObjectAccess<'de> {
231216 }
232217}
233218
234- #[ cfg( not( feature = "preserve_order" ) ) ]
235219struct ObjectRefAccess < ' de > {
236220 i : halfbrown:: Iter < ' de , Cow < ' de , str > , Value < ' de > > ,
237221 v : Option < & ' de Value < ' de > > ,
238222}
239223
240- #[ cfg( feature = "preserve_order" ) ]
241- struct ObjectRefAccess < ' de > {
242- i : indexmap:: map:: Iter < ' de , Cow < ' de , str > , Value < ' de > > ,
243- v : Option < & ' de Value < ' de > > ,
244- }
245-
246- #[ cfg( not( feature = "preserve_order" ) ) ]
247224impl < ' de > ObjectRefAccess < ' de > {
248225 fn new ( i : halfbrown:: Iter < ' de , Cow < ' de , str > , Value < ' de > > ) -> Self {
249226 Self { i, v : None }
250227 }
251228}
252229
253- #[ cfg( feature = "preserve_order" ) ]
254- impl < ' de > ObjectRefAccess < ' de > {
255- fn new ( i : indexmap:: map:: Iter < ' de , Cow < ' de , str > , Value < ' de > > ) -> Self {
256- Self { i, v : None }
257- }
258- }
259-
260230// `MapAccess` is provided to the `Visitor` to give it the ability to iterate
261231// through entries of the map.
262232impl < ' de > MapAccess < ' de > for ObjectRefAccess < ' de > {
0 commit comments