Commit 9cb2a2e
committed
Get rid of deserialize_option! macro
MapValueDeseriaizer and SeqItemDeserializer should emit error on DeEvent::Eof
instead of calling Visitor::visit_none(). We delegate emitting appropriate error
to the Some variant.
The content of deserialize_option! macro was inlined and handling of DeEvent::Eof
was removed from MapValueDeseriaizer and SeqItemDeserializer.
This does not change existing behavior, because Eof in the middle of struct anyway
would be captured by `read_to_end()` call at the end of structure deserialization,
but this change will report an error in appropriate place, which would important
when we implement error position tracking1 parent 4b8f17d commit 9cb2a2e
2 files changed
+15
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
| 546 | + | |
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
550 | | - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
551 | 554 | | |
552 | 555 | | |
553 | 556 | | |
| |||
870 | 873 | | |
871 | 874 | | |
872 | 875 | | |
873 | | - | |
| 876 | + | |
874 | 877 | | |
875 | 878 | | |
876 | 879 | | |
877 | | - | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
878 | 884 | | |
879 | 885 | | |
880 | 886 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1954 | 1954 | | |
1955 | 1955 | | |
1956 | 1956 | | |
1957 | | - | |
1958 | | - | |
1959 | | - | |
1960 | | - | |
1961 | | - | |
1962 | | - | |
1963 | | - | |
1964 | | - | |
1965 | | - | |
1966 | | - | |
1967 | 1957 | | |
1968 | 1958 | | |
1969 | 1959 | | |
| |||
2875 | 2865 | | |
2876 | 2866 | | |
2877 | 2867 | | |
2878 | | - | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
2879 | 2873 | | |
2880 | 2874 | | |
2881 | 2875 | | |
| |||
0 commit comments