Skip to content

Commit

Permalink
fix(serde-rs#151): renaming Deserializer::visit_* to Deserializer::de…
Browse files Browse the repository at this point in the history
…serialize_*
  • Loading branch information
oli-obk committed Oct 20, 2015
1 parent bf31fee commit 56c42a9
Show file tree
Hide file tree
Showing 8 changed files with 246 additions and 246 deletions.
6 changes: 3 additions & 3 deletions serde/src/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<'a> ser::Serialize for Bytes<'a> {
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
where S: ser::Serializer
{
serializer.visit_bytes(self.bytes)
serializer.serialize_bytes(self.bytes)
}
}

Expand Down Expand Up @@ -140,7 +140,7 @@ impl ser::Serialize for ByteBuf {
fn serialize<S>(&self, serializer: &mut S) -> Result<(), S::Error>
where S: ser::Serializer
{
serializer.visit_bytes(&self)
serializer.serialize_bytes(&self)
}
}

Expand Down Expand Up @@ -199,7 +199,7 @@ impl de::Deserialize for ByteBuf {
fn deserialize<D>(deserializer: &mut D) -> Result<ByteBuf, D::Error>
where D: de::Deserializer
{
deserializer.visit_bytes(ByteBufVisitor)
deserializer.deserialize_bytes(ByteBufVisitor)
}
}

Expand Down
50 changes: 25 additions & 25 deletions serde/src/de/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl Deserialize for () {
fn deserialize<D>(deserializer: &mut D) -> Result<(), D::Error>
where D: Deserializer,
{
deserializer.visit_unit(UnitVisitor)
deserializer.deserialize_unit(UnitVisitor)
}
}

Expand Down Expand Up @@ -97,7 +97,7 @@ impl Deserialize for bool {
fn deserialize<D>(deserializer: &mut D) -> Result<bool, D::Error>
where D: Deserializer,
{
deserializer.visit_bool(BoolVisitor)
deserializer.deserialize_bool(BoolVisitor)
}
}

Expand Down Expand Up @@ -171,18 +171,18 @@ macro_rules! impl_deserialize_num {
}
}

impl_deserialize_num!(isize, visit_isize);
impl_deserialize_num!(i8, visit_i8);
impl_deserialize_num!(i16, visit_i16);
impl_deserialize_num!(i32, visit_i32);
impl_deserialize_num!(i64, visit_i64);
impl_deserialize_num!(usize, visit_usize);
impl_deserialize_num!(u8, visit_u8);
impl_deserialize_num!(u16, visit_u16);
impl_deserialize_num!(u32, visit_u32);
impl_deserialize_num!(u64, visit_u64);
impl_deserialize_num!(f32, visit_f32);
impl_deserialize_num!(f64, visit_f64);
impl_deserialize_num!(isize, deserialize_isize);
impl_deserialize_num!(i8, deserialize_i8);
impl_deserialize_num!(i16, deserialize_i16);
impl_deserialize_num!(i32, deserialize_i32);
impl_deserialize_num!(i64, deserialize_i64);
impl_deserialize_num!(usize, deserialize_usize);
impl_deserialize_num!(u8, deserialize_u8);
impl_deserialize_num!(u16, deserialize_u16);
impl_deserialize_num!(u32, deserialize_u32);
impl_deserialize_num!(u64, deserialize_u64);
impl_deserialize_num!(f32, deserialize_f32);
impl_deserialize_num!(f64, deserialize_f64);

///////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -220,7 +220,7 @@ impl Deserialize for char {
fn deserialize<D>(deserializer: &mut D) -> Result<char, D::Error>
where D: Deserializer,
{
deserializer.visit_char(CharVisitor)
deserializer.deserialize_char(CharVisitor)
}
}

Expand Down Expand Up @@ -266,7 +266,7 @@ impl Deserialize for String {
fn deserialize<D>(deserializer: &mut D) -> Result<String, D::Error>
where D: Deserializer,
{
deserializer.visit_string(StringVisitor)
deserializer.deserialize_string(StringVisitor)
}
}

Expand Down Expand Up @@ -300,7 +300,7 @@ impl<T> Deserialize for Option<T> where T: Deserialize {
fn deserialize<D>(deserializer: &mut D) -> Result<Option<T>, D::Error>
where D: Deserializer,
{
deserializer.visit_option(OptionVisitor { marker: PhantomData })
deserializer.deserialize_option(OptionVisitor { marker: PhantomData })
}
}

Expand Down Expand Up @@ -364,7 +364,7 @@ macro_rules! seq_impl {
fn deserialize<D>(deserializer: &mut D) -> Result<$ty, D::Error>
where D: Deserializer,
{
deserializer.visit_seq($visitor_name::new())
deserializer.deserialize_seq($visitor_name::new())
}
}
}
Expand Down Expand Up @@ -474,7 +474,7 @@ impl<T> Deserialize for [T; 0]
fn deserialize<D>(deserializer: &mut D) -> Result<[T; 0], D::Error>
where D: Deserializer,
{
deserializer.visit_seq(ArrayVisitor0::new())
deserializer.deserialize_seq(ArrayVisitor0::new())
}
}

Expand Down Expand Up @@ -520,7 +520,7 @@ macro_rules! array_impls {
fn deserialize<D>(deserializer: &mut D) -> Result<[T; $len], D::Error>
where D: Deserializer,
{
deserializer.visit_seq($visitor::new())
deserializer.deserialize_seq($visitor::new())
}
}
)+
Expand Down Expand Up @@ -621,7 +621,7 @@ macro_rules! tuple_impls {
fn deserialize<D>(deserializer: &mut D) -> Result<($($name,)+), D::Error>
where D: Deserializer,
{
deserializer.visit_tuple($len, $visitor::new())
deserializer.deserialize_tuple($len, $visitor::new())
}
}
)+
Expand Down Expand Up @@ -705,7 +705,7 @@ macro_rules! map_impl {
fn deserialize<D>(deserializer: &mut D) -> Result<$ty, D::Error>
where D: Deserializer,
{
deserializer.visit_map($visitor_name::new())
deserializer.deserialize_map($visitor_name::new())
}
}
}
Expand Down Expand Up @@ -753,7 +753,7 @@ impl Deserialize for path::PathBuf {
fn deserialize<D>(deserializer: &mut D) -> Result<path::PathBuf, D::Error>
where D: Deserializer,
{
deserializer.visit(PathBufVisitor)
deserializer.deserialize(PathBufVisitor)
}
}

Expand Down Expand Up @@ -862,7 +862,7 @@ impl<T, E> Deserialize for Result<T, E> where T: Deserialize, E: Deserialize {
}
}

deserializer.visit(FieldVisitor)
deserializer.deserialize(FieldVisitor)
}
}

Expand Down Expand Up @@ -892,6 +892,6 @@ impl<T, E> Deserialize for Result<T, E> where T: Deserialize, E: Deserialize {

const VARIANTS: &'static [&'static str] = &["Ok", "Err"];

deserializer.visit_enum("Result", VARIANTS, Visitor(PhantomData))
deserializer.deserialize_enum("Result", VARIANTS, Visitor(PhantomData))
}
}
Loading

0 comments on commit 56c42a9

Please sign in to comment.