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.