Allow deserialization of unit from any escaped value.
This will allow deserialization of attributes into fields with unit types when you don't
needed the actual value of the attribute but only the fact that attribute was defined
@@ -145,13 +145,7 @@ impl<'de> serde::Deserializer<'de> for EscapedDeserializer {
where
V: Visitor<'de>,
{
- if self.escaped_value.is_empty() {
visitor.visit_unit()
- } else {
- Err(DeError::InvalidUnit(
- "Expecting unit, got non empty attribute".into(),
- ))
- }
}
fn deserialize_option<V>(self, visitor: V) -> Result<V::Value, Self::Error>
