Skip to content

Add serde Serialize/Deserialize for LanguageIdentifier. #89

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

Merged
merged 1 commit into from
May 18, 2020

Conversation

zbraniecki
Copy link
Member

This is a simple port of zbraniecki/unic-locale#57 which adds serializer/deserializer for LanguageIdentifier enabled when the crate is compiled with serde.

@zbraniecki zbraniecki requested a review from echeran May 14, 2020 21:49
}

#[test]
fn deserialize() -> Result<(), Box<dyn std::error::Error>> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is the signature of the test to have a return value something specific to SerDe code, a Rust convention, or something else?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a pure convenience - it allows the test function to use ? shorthand operator. I could remove it and replace with .unwrap().

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zbraniecki
Copy link
Member Author

@sffc do you want to remain on the blocking path? If not, I'd prefer if you removed yourself than me removing a pending reviewer :)

@zbraniecki zbraniecki merged commit db83c35 into unicode-org:master May 18, 2020
@zbraniecki zbraniecki deleted the loc-serde branch June 29, 2020 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants