@@ -51,21 +51,21 @@ pub struct Error {
5151 err : ErrorImpl ,
5252}
5353
54- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
54+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
5555type ErrorImpl = Box < str > ;
56- #[ cfg( not( any( feature = "std" , feature = "collections " ) ) ) ]
56+ #[ cfg( not( any( feature = "std" , feature = "alloc " ) ) ) ]
5757type ErrorImpl = ( ) ;
5858
5959impl de:: Error for Error {
60- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
60+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
6161 fn custom < T > ( msg : T ) -> Self
6262 where
6363 T : Display ,
6464 {
6565 Error { err : msg. to_string ( ) . into_boxed_str ( ) }
6666 }
6767
68- #[ cfg( not( any( feature = "std" , feature = "collections " ) ) ) ]
68+ #[ cfg( not( any( feature = "std" , feature = "alloc " ) ) ) ]
6969 fn custom < T > ( msg : T ) -> Self
7070 where
7171 T : Display ,
@@ -85,12 +85,12 @@ impl ser::Error for Error {
8585}
8686
8787impl Display for Error {
88- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
88+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
8989 fn fmt ( & self , formatter : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
9090 formatter. write_str ( & self . err )
9191 }
9292
93- #[ cfg( not( any( feature = "std" , feature = "collections " ) ) ) ]
93+ #[ cfg( not( any( feature = "std" , feature = "alloc " ) ) ) ]
9494 fn fmt ( & self , formatter : & mut fmt:: Formatter ) -> Result < ( ) , fmt:: Error > {
9595 formatter. write_str ( "Serde deserialization error" )
9696 }
@@ -425,14 +425,14 @@ where
425425////////////////////////////////////////////////////////////////////////////////
426426
427427/// A deserializer holding a `String`.
428- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
428+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
429429#[ derive( Clone , Debug ) ]
430430pub struct StringDeserializer < E > {
431431 value : String ,
432432 marker : PhantomData < E > ,
433433}
434434
435- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
435+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
436436impl < ' de , E > IntoDeserializer < ' de , E > for String
437437where
438438 E : de:: Error ,
@@ -447,7 +447,7 @@ where
447447 }
448448}
449449
450- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
450+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
451451impl < ' de , E > de:: Deserializer < ' de > for StringDeserializer < E >
452452where
453453 E : de:: Error ,
@@ -482,7 +482,7 @@ where
482482 }
483483}
484484
485- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
485+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
486486impl < ' de , ' a , E > de:: EnumAccess < ' de > for StringDeserializer < E >
487487where
488488 E : de:: Error ,
@@ -501,14 +501,14 @@ where
501501////////////////////////////////////////////////////////////////////////////////
502502
503503/// A deserializer holding a `Cow<str>`.
504- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
504+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
505505#[ derive( Clone , Debug ) ]
506506pub struct CowStrDeserializer < ' a , E > {
507507 value : Cow < ' a , str > ,
508508 marker : PhantomData < E > ,
509509}
510510
511- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
511+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
512512impl < ' de , ' a , E > IntoDeserializer < ' de , E > for Cow < ' a , str >
513513where
514514 E : de:: Error ,
@@ -523,7 +523,7 @@ where
523523 }
524524}
525525
526- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
526+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
527527impl < ' de , ' a , E > de:: Deserializer < ' de > for CowStrDeserializer < ' a , E >
528528where
529529 E : de:: Error ,
@@ -561,7 +561,7 @@ where
561561 }
562562}
563563
564- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
564+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
565565impl < ' de , ' a , E > de:: EnumAccess < ' de > for CowStrDeserializer < ' a , E >
566566where
567567 E : de:: Error ,
@@ -727,7 +727,7 @@ impl Expected for ExpectedInSeq {
727727
728728////////////////////////////////////////////////////////////////////////////////
729729
730- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
730+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
731731impl < ' de , T , E > IntoDeserializer < ' de , E > for Vec < T >
732732where
733733 T : IntoDeserializer < ' de , E > ,
@@ -740,7 +740,7 @@ where
740740 }
741741}
742742
743- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
743+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
744744impl < ' de , T , E > IntoDeserializer < ' de , E > for BTreeSet < T >
745745where
746746 T : IntoDeserializer < ' de , E > + Eq + Ord ,
@@ -1145,7 +1145,7 @@ impl Expected for ExpectedInMap {
11451145
11461146////////////////////////////////////////////////////////////////////////////////
11471147
1148- #[ cfg( any( feature = "std" , feature = "collections " ) ) ]
1148+ #[ cfg( any( feature = "std" , feature = "alloc " ) ) ]
11491149impl < ' de , K , V , E > IntoDeserializer < ' de , E > for BTreeMap < K , V >
11501150where
11511151 K : IntoDeserializer < ' de , E > + Eq + Ord ,
0 commit comments