Skip to content

Commit

Permalink
Support deserializing flattened unit
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Aug 10, 2020
1 parent ba07075 commit bf76f50
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion serde/src/private/de.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2763,6 +2763,13 @@ where
}
}

fn deserialize_unit<V>(self, visitor: V) -> Result<V::Value, Self::Error>
where
V: Visitor<'de>,
{
visitor.visit_unit()
}

forward_to_deserialize_other! {
deserialize_bool()
deserialize_i8()
Expand All @@ -2780,7 +2787,6 @@ where
deserialize_string()
deserialize_bytes()
deserialize_byte_buf()
deserialize_unit()
deserialize_unit_struct(&'static str)
deserialize_seq()
deserialize_tuple(usize)
Expand Down

0 comments on commit bf76f50

Please sign in to comment.