mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-29 07:07:57 +00:00
Fix #[derive_deserialize] for deserializing empty sequences named units
This commit is contained in:
@@ -827,6 +827,15 @@ fn deserialize_struct_empty_fields(
|
||||
Err(::serde2::de::Error::syntax_error())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[inline]
|
||||
fn visit_seq<V>(&mut self, mut visitor: V) -> Result<$type_ident, V::Error>
|
||||
where V: de::SeqVisitor,
|
||||
{
|
||||
try!(visitor.end());
|
||||
self.visit_unit()
|
||||
}
|
||||
}
|
||||
|
||||
$state.visit(__Visitor)
|
||||
|
||||
Reference in New Issue
Block a user