1
Fork 0

Revert "renamed read_nil to read_unit"

This reverts commit 37d0600c23.
This commit is contained in:
kenta7777 2018-09-11 22:20:09 +09:00
parent 10b2083a6d
commit fa683ac656
4 changed files with 5 additions and 5 deletions

View file

@ -298,7 +298,7 @@ macro_rules! implement_ty_decoder {
type Error = String;
__impl_decoder_methods! {
read_unit -> ();
read_nil -> ();
read_u128 -> u128;
read_u64 -> u64;

View file

@ -2128,7 +2128,7 @@ macro_rules! read_primitive {
impl ::Decoder for Decoder {
type Error = DecoderError;
fn read_unit(&mut self) -> DecodeResult<()> {
fn read_nil(&mut self) -> DecodeResult<()> {
expect!(self.pop(), Null)
}

View file

@ -228,7 +228,7 @@ impl<'a> serialize::Decoder for Decoder<'a> {
type Error = String;
#[inline]
fn read_unit(&mut self) -> Result<(), Self::Error> {
fn read_nil(&mut self) -> Result<(), Self::Error> {
Ok(())
}

View file

@ -167,7 +167,7 @@ pub trait Decoder {
type Error;
// Primitive types:
fn read_unit(&mut self) -> Result<(), Self::Error>;
fn read_nil(&mut self) -> Result<(), Self::Error>;
fn read_usize(&mut self) -> Result<usize, Self::Error>;
fn read_u128(&mut self) -> Result<u128, Self::Error>;
fn read_u64(&mut self) -> Result<u64, Self::Error>;
@ -543,7 +543,7 @@ impl Encodable for () {
impl Decodable for () {
fn decode<D: Decoder>(d: &mut D) -> Result<(), D::Error> {
d.read_unit()
d.read_nil()
}
}