Update Rust crate serde_with to 2.3.3 #31
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/serde_with-2.x"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
2.0.1->2.3.3Release Notes
jonasbb/serde_with
v2.3.3: serde_with v2.3.3Compare Source
Changed
synto v2 anddarlingto v0.20 (#578)Update proc-macro dependencies.
This change should have no impact on users, but now uses the same dependency as
serde_derive.v2.3.2: serde_with v2.3.2Compare Source
Changed
Improve the error message when deserializing
OneOrManyorPickFirstfails.It now includes the original error message for each of the individual variants.
This is possible by dropping untagged enums as the internal implementations, since they will likely never support this, as these old PRs show serde#2376 and serde#1544.
The new errors look like:
Fixed
Thanks to @nox for submitting a PR.
v2.3.1: serde_with v2.3.1Compare Source
Fixed
Undo the changes to the trait bound for
Seq. (#570, #571)The new implementation caused issues with serialization formats that require the sequence length beforehand.
It also caused problems, that certain attributes which worked before no longer worked, due to mismatching number of references.
Thanks to @stefunctional for reporting and for @stephaneyfx for providing a test case.
v2.3.0: serde_with v2.3.0Compare Source
Added
Add
serde_ascompatible versions for the existing duplicate key and value handling. (#534)The new types
MapPreventDuplicates,MapFirstKeyWins,SetPreventDuplicates, andSetLastValueWinscan replace the existing modulesmaps_duplicate_key_is_error,maps_first_key_wins,sets_duplicate_value_is_error, andsets_last_value_wins.Added a new
KeyValueMaptype using the map key as a struct field. (#341)This conversion is useful for maps, where an ID value is the map key, but the ID should become part of a single struct.
The conversion allows this, by using a special field named
$key$.This conversion is possible for structs and maps, using the
$key$field.Tuples, tuple structs, and sequences are supported by turning the first value into the map key.
Each of the
SimpleStructswill turn into a JSON snippet like this.
Changed
Seqto allow for more custom types. (#565)This extends the support beyond tuples.
Fixed
EnumMappasses thehuman_readablestatus of theSerializerto more places.allocon targets withouttarget_has_atomic = "ptr". (#560)Thanks to @vembacher for reporting and fixing the issue.
v2.2.0: serde_with v2.2.0Compare Source
Added
Add new
MapandSeqtypes for converting between maps and tuple lists. (#527)The behavior is not new, but already present using
BTreeMap/HashMaporVec.However, the new types
MapandSeqare also available onno_std, even without theallocfeature.Changed
serde_with_macrosdependency to the same version as the main crate.This simplifies publishing and ensures that always a compatible version is picked.
Fixed
serde_with::applyhad an issue matching types when invisible token groups where in use (#538)The token groups can stem from macro_rules expansion, but should be treated mostly transparent.
The old code required a group to match a group, while now groups are silently removed when checking for type patterns.
v2.1.0: serde_with v2.1.0Compare Source
Added
Add new
applyattribute to simplify repetitive attributes over many fields.Multiple rules and multiple attributes can be provided each.
The
applyattribute will expand into this, applying the attributs to the matching fields:The attribute supports field matching using many rules, such as
_to apply to all fields and partial generics likeOptionto match anyOptionbe itOption<String>,Option<bool>, orOption<T>.Fixed
The derive macros
SerializeDisplayandDeserializeFromStrnow take better care not to use conflicting names for generic values. (#526)All used generics now start with
__to make conflicts with manually written code unlikely.Thanks to @Elrendio for submitting a PR fixing the issue.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.