Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Deserialize empty plain scalar to an empty map or seq #312

Merged
merged 1 commit into from Aug 13, 2022
Merged

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Aug 13, 2022

Fixes #304.

@dtolnay dtolnay merged commit 4c9065e into master Aug 13, 2022
@dtolnay dtolnay deleted the empty branch August 13, 2022 20:16
molpopgen added a commit to molpopgen/demes-rs that referenced this pull request Aug 22, 2022
serde_yaml 0.9.7 resulted in a regression,
accepting `metadata:` (empty metadata mappings)
instead of returning Err.

See dtolnay/serde-yaml#304 and dtolnay/serde-yaml#312

This change uses a custom deserializer to error
in this case.
molpopgen added a commit to molpopgen/demes-rs that referenced this pull request Aug 22, 2022
serde_yaml 0.9.7 resulted in a regression,
accepting `metadata:` (empty metadata mappings)
instead of returning Err.

See dtolnay/serde-yaml#304 and dtolnay/serde-yaml#312

This change uses a custom deserializer to error
in this case.
molpopgen added a commit to molpopgen/demes-rs that referenced this pull request Aug 22, 2022
serde_yaml 0.9.7 resulted in a regression,
accepting `metadata:` (empty metadata mappings)
instead of returning Err.

See dtolnay/serde-yaml#304 and dtolnay/serde-yaml#312

This change uses a custom deserializer to error
in this case.
molpopgen added a commit to molpopgen/demes-rs that referenced this pull request Aug 22, 2022
* refactor: Metadata now uses custom deserializer

serde_yaml 0.9.7 resulted in a regression,
accepting `metadata:` (empty metadata mappings)
instead of returning Err.

See dtolnay/serde-yaml#304 and dtolnay/serde-yaml#312

This change uses a custom deserializer to error
in this case.

* fix: fix clippy::unnecessary_to_owned lint
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deserialize empty map and default value
1 participant