Skip to content
Prev Previous commit
Locate test failure - need to parse enum struct
  • Loading branch information
ethanfrey committed Oct 26, 2019
commit 0977eeb18e0bdc06047b29934a7591922f5cc5f3
3 changes: 3 additions & 0 deletions src/de/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,10 @@ impl<'a, 'de> de::Deserializer<'de> for &'a mut Deserializer<'de> {
V: Visitor<'de>,
{
match self.parse_whitespace().ok_or(Error::EofWhileParsingValue)? {
// if it is a string enum
b'"' => visitor.visit_enum(UnitVariantAccess::new(self)),
// if it is a struct enum
b'{' => Err(Error::Custom("TODO: parse enum struct".to_string())),
_ => Err(Error::ExpectedSomeValue),
}
}
Expand Down