From b9a938a01cf474e93163e493d79b16cf7a6ad87c Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Tue, 21 Jul 2015 20:39:49 -0700 Subject: [PATCH] Some default de::Visitor::visit* should proxy to other methods --- serde/src/de/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/serde/src/de/mod.rs b/serde/src/de/mod.rs index d76424de..5484a7b7 100644 --- a/serde/src/de/mod.rs +++ b/serde/src/de/mod.rs @@ -214,7 +214,7 @@ pub trait Deserializer { fn visit_unit_struct(&mut self, _name: &str, visitor: V) -> Result where V: Visitor, { - self.visit(visitor) + self.visit_unit(visitor) } /// This method hints that the `Deserialize` type is expecting a tuple struct. This allows @@ -223,7 +223,7 @@ pub trait Deserializer { fn visit_tuple_struct(&mut self, _name: &str, visitor: V) -> Result where V: Visitor, { - self.visit_seq(visitor) + self.visit_tuple(visitor) } /// This method hints that the `Deserialize` type is expecting a struct. This allows @@ -244,7 +244,7 @@ pub trait Deserializer { fn visit_tuple(&mut self, visitor: V) -> Result where V: Visitor, { - self.visit(visitor) + self.visit_seq(visitor) } /// This method hints that the `Deserialize` type is expecting an enum value. This allows @@ -264,7 +264,7 @@ pub trait Deserializer { fn visit_bytes(&mut self, visitor: V) -> Result where V: Visitor, { - self.visit(visitor) + self.visit_seq(visitor) } /// Specify a format string for the deserializer.