Skip to content
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

Fix encoding of Uuid's that come from Serde #188

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlexRiedler
Copy link

  • Uuid are converted to Value::String by default, instead of Value::Uuid

Not sure if there is another way to complete this, I am relatively new to Rust so don't quite understand if we can tame Serde somehow to convert to Value::Uuid.

- Uuid are converted to Value::String by default, instead of Value::Uuid
Copy link
Owner

@flavray flavray left a comment

Choose a reason for hiding this comment

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

Thank you for tackling this!
This looks good to me, just a comment regarding style.

@@ -82,6 +82,9 @@ pub fn encode_ref(value: &Value, schema: &Schema, buffer: &mut Vec<u8>) {
encode_int(index as i32, buffer);
}
}
Schema::Uuid => {
Copy link
Owner

Choose a reason for hiding this comment

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

nit: you could probably get away with (L77)

Schema::String | Schema::Uuid => {
    ...
}

🙂

@simon-an
Copy link

Can this please be merged?

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