Skip to content

Commit

Permalink
Fixing newtype struct parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ecton committed May 16, 2023
1 parent ee55241 commit 7c5f6a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,13 +423,13 @@ impl<'de> serde::de::Deserializer<'de> for &mut Deserializer<'de> {

fn deserialize_newtype_struct<V>(
self,
_name: &'static str,
name: &'static str,
visitor: V,
) -> Result<V::Value, Self::Error>
where
V: serde::de::Visitor<'de>,
{
self.deserialize_seq(visitor)
self.deserialize_tuple_struct(name, 1, visitor)
}

fn deserialize_seq<V>(self, visitor: V) -> Result<V::Value, Self::Error>
Expand Down

0 comments on commit 7c5f6a4

Please sign in to comment.