Skip to content

RUST-647 Sync spec tests for invalid relaxed UUIDs #228

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 3 commits into from
Jan 29, 2021

Conversation

isabelatkinson
Copy link
Contributor

No description provided.

@@ -173,42 +173,21 @@ pub(crate) struct Uuid {
}

impl Uuid {
pub(crate) fn parse(mut self) -> extjson::de::Result<crate::Binary> {
if !valid_uuid_format(&self.value) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The checks in valid_uuid_format do not account for extraneous hyphens (covered in this new test). Since we added the uuid crate as a dependency when implementing the serde helpers, I switched this method to parse into a uuid::Uuid rather than do the work manually.

@isabelatkinson isabelatkinson marked this pull request as ready for review January 26, 2021 20:04
@isabelatkinson isabelatkinson merged commit d8d8ebe into mongodb:master Jan 29, 2021
@isabelatkinson isabelatkinson deleted the RUST-647 branch September 13, 2021 20:23
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.

3 participants