forked from serde-rs/serde
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from serde-rs:master #32
Open
pull
wants to merge
1,014
commits into
mesalock-linux:master
Choose a base branch
from
serde-rs:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
dtolnay
force-pushed
the
master
branch
2 times, most recently
from
September 3, 2022 04:16
58c82f1
to
d208762
Compare
Reword PR 2588 comment
Duplicate the serde_derive dependency version in one fewer place
Remove custom encode_utf8 implementation in favor of standard one
Remove support for emscripten targets on rustc older than 1.40
Adopt new Cargo feature resolver
variants and untagged variants
Moved and renamed: From test_annotations - test_expecting_message_untagged_tagged_enum => expecting_message - flatten::enum_::untagged::straitforward => contains_flatten From test_macros - test_untagged_newtype_struct => newtype_struct - test_untagged_enum => complex - test_untagged_enum_with_flattened_integer_key => contains_flatten_with_integer_key - test_enum_in_untagged_enum => newtype_enum - test_untagged_bytes => string_and_bytes - test_untagged_newtype_variant_containing_unit_struct_not_map => newtype_unit_and_empty_map
(review this commit with "ignore whitespace changes" option on)
…en==0 condition failures (2): newtype_enum::empty_struct_from_seq newtype_enum::tuple0
SeqRefDeserializer::deserialize_any has a special condition for empty sequence, which emits visit_unit. That condition assumes that type would be able to deserialized from unit, but: 1) struct variants was never able to deserialize from it (they expect only visit_map or visit_seq) 2) tuple variants even with zero fields expect visit_seq only. The suggestion to accept visit_unit instead was rejected in #2520 Fixes (2): newtype_enum::tuple0 newtype_enum::empty_struct_from_seq
Although they are slightly different, this difference is irrelevant: - MapDeserializer has a specialization for deserialize_seq and deserialize_tuple, but only MapRefDeserializer::deserialize_any is used by the code which is almost the same - MapDeserializer checks that map was consumed after visit_map, but MapRefDeserializer does not. Actually, each derived implementation consumes map and each manual implementation also should consume it Also, MapDeserializer already used when value deserialized from ContentRefDeserializer directly and MapRefDeserializer was only used to deserialize Struct variants of enums. There are no reasons why the behavior should be different in those two cases
Fix deserialization of empty structs and tuples in untagged enums
…running rust version newer than 1.77, where core::net was stabilized
Implement serialize/deserialize for core::net instead of std::net
Delete doc(cfg) attribute from impls that are supported in no-std
Stabilize no-std Error trait
Eliminate closures capturing needlessly many type parameters
Remove explicit ContentDeserializer construction in visit functions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by pull[bot]
Can you help keep this open source service alive? 💖 Please sponsor : )