-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #580: deserialize newtypes using Visitor::visit_newtype_struct in…
…stead of visit_seq The problem was in `SeqItemDeserializer::deserialize_newtype_struct`. Previously it was the same as `SeqItemDeserializer::deserialize_seq`, but deserializing sequences in this deserializer assumes, that those sequences are `xs:list`s, because deserializer itself represents a list element. In the original bug report an `UnexpectedEof` is returning. The error was changed in the pre-previous commit (3d5ed69) and in this it is fixed. The following tests checks that all's OK: - Deserializer::deserialize_newtype_struct is reached by: - serde-de: - newtype::excess_attribute - newtype::simple - serde-se: - with_root::newtype - without_root::newtype - MapValueDeserializer::deserialize_newtype_struct is reached by: - serde-issues: - issue343 - SeqItemDeserializer::deserialize_newtype_struct is reached by: - serde-issues: - issue580
- Loading branch information
Showing
3 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters