This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -2419,7 +2419,7 @@ impl<S: Encoder> rustc_serialize::Encodable<S> for AttrId {
24192419
24202420impl < D : Decoder > rustc_serialize:: Decodable < D > for AttrId {
24212421 fn decode ( d : & mut D ) -> Result < AttrId , D :: Error > {
2422- d. read_nil ( ) . map ( |_| crate :: attr:: mk_attr_id ( ) )
2422+ d. read_unit ( ) . map ( |_| crate :: attr:: mk_attr_id ( ) )
24232423 }
24242424}
24252425
Original file line number Diff line number Diff line change @@ -459,7 +459,7 @@ macro_rules! implement_ty_decoder {
459459 type Error = String ;
460460
461461 $crate:: __impl_decoder_methods! {
462- read_nil -> ( ) ;
462+ read_unit -> ( ) ;
463463
464464 read_u128 -> u128 ;
465465 read_u64 -> u64 ;
Original file line number Diff line number Diff line change @@ -2240,7 +2240,7 @@ macro_rules! read_primitive {
22402240impl crate :: Decoder for Decoder {
22412241 type Error = DecoderError ;
22422242
2243- fn read_nil ( & mut self ) -> DecodeResult < ( ) > {
2243+ fn read_unit ( & mut self ) -> DecodeResult < ( ) > {
22442244 expect ! ( self . pop( ) , Null )
22452245 }
22462246
Original file line number Diff line number Diff line change @@ -567,7 +567,7 @@ impl<'a> serialize::Decoder for Decoder<'a> {
567567 type Error = String ;
568568
569569 #[ inline]
570- fn read_nil ( & mut self ) -> Result < ( ) , Self :: Error > {
570+ fn read_unit ( & mut self ) -> Result < ( ) , Self :: Error > {
571571 Ok ( ( ) )
572572 }
573573
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ pub trait Decoder {
177177 type Error ;
178178
179179 // Primitive types:
180- fn read_nil ( & mut self ) -> Result < ( ) , Self :: Error > ;
180+ fn read_unit ( & mut self ) -> Result < ( ) , Self :: Error > ;
181181 fn read_usize ( & mut self ) -> Result < usize , Self :: Error > ;
182182 fn read_u128 ( & mut self ) -> Result < u128 , Self :: Error > ;
183183 fn read_u64 ( & mut self ) -> Result < u64 , Self :: Error > ;
@@ -436,7 +436,7 @@ impl<S: Encoder> Encodable<S> for () {
436436
437437impl < D : Decoder > Decodable < D > for ( ) {
438438 fn decode ( d : & mut D ) -> Result < ( ) , D :: Error > {
439- d. read_nil ( )
439+ d. read_unit ( )
440440 }
441441}
442442
@@ -448,7 +448,7 @@ impl<S: Encoder, T> Encodable<S> for PhantomData<T> {
448448
449449impl < D : Decoder , T > Decodable < D > for PhantomData < T > {
450450 fn decode ( d : & mut D ) -> Result < PhantomData < T > , D :: Error > {
451- d. read_nil ( ) ?;
451+ d. read_unit ( ) ?;
452452 Ok ( PhantomData )
453453 }
454454}
You can’t perform that action at this time.
0 commit comments