Skip to content

Commit

Permalink
Deserializer should not check correctness of data, this is the respon…
Browse files Browse the repository at this point in the history
…sibility of the Visitor

Examples of errors produced during deserialization of internally tagged enums in tests
if instead of a Seq/Map a Str("unexpected string") will be provided:

In tests/test_annotations.rs
  flatten::enum_::internally_tagged::tuple:
    before: `invalid type: string "unexpected string", expected tuple variant`
    after : `invalid type: string "unexpected string", expected tuple variant Enum::Tuple`

  flatten::enum_::internally_tagged::struct_from_map:
    before: `invalid type: string "unexpected string", expected struct variant`
    after : `invalid type: string "unexpected string", expected struct variant Enum::Struct`
  • Loading branch information
Mingun committed Aug 24, 2024
1 parent 36266bd commit 8f7bff7
Showing 1 changed file with 63 additions and 588 deletions.
Loading

0 comments on commit 8f7bff7

Please sign in to comment.