Skip to content

Commit fa683ac

Browse files
committed
Revert "renamed read_nil to read_unit"
This reverts commit 37d0600.
1 parent 10b2083 commit fa683ac

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/librustc/ty/codec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ macro_rules! implement_ty_decoder {
298298
type Error = String;
299299

300300
__impl_decoder_methods! {
301-
read_unit -> ();
301+
read_nil -> ();
302302

303303
read_u128 -> u128;
304304
read_u64 -> u64;

src/libserialize/json.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2128,7 +2128,7 @@ macro_rules! read_primitive {
21282128
impl ::Decoder for Decoder {
21292129
type Error = DecoderError;
21302130

2131-
fn read_unit(&mut self) -> DecodeResult<()> {
2131+
fn read_nil(&mut self) -> DecodeResult<()> {
21322132
expect!(self.pop(), Null)
21332133
}
21342134

src/libserialize/opaque.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ impl<'a> serialize::Decoder for Decoder<'a> {
228228
type Error = String;
229229

230230
#[inline]
231-
fn read_unit(&mut self) -> Result<(), Self::Error> {
231+
fn read_nil(&mut self) -> Result<(), Self::Error> {
232232
Ok(())
233233
}
234234

src/libserialize/serialize.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub trait Decoder {
167167
type Error;
168168

169169
// Primitive types:
170-
fn read_unit(&mut self) -> Result<(), Self::Error>;
170+
fn read_nil(&mut self) -> Result<(), Self::Error>;
171171
fn read_usize(&mut self) -> Result<usize, Self::Error>;
172172
fn read_u128(&mut self) -> Result<u128, Self::Error>;
173173
fn read_u64(&mut self) -> Result<u64, Self::Error>;
@@ -543,7 +543,7 @@ impl Encodable for () {
543543

544544
impl Decodable for () {
545545
fn decode<D: Decoder>(d: &mut D) -> Result<(), D::Error> {
546-
d.read_unit()
546+
d.read_nil()
547547
}
548548
}
549549

0 commit comments

Comments
 (0)