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

return error when deserializing the identity #671

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

conradoplg
Copy link
Contributor

@conradoplg conradoplg commented Jun 8, 2024

Closes #667

To keep serde working, I switched to another approach which is actually much simpler. Instead of using serde(try_from/into) (which I no longer couldn't since there is no try_into) I simply created a SerializedElement type which does define serde encoding and used it in place of a raw Element. This allows the struct that contains it to support serde by simply deriving it. It does introduce some friction by requiring using e.g. val.0 .0 but that's internal (and can be avoided with getters). We should probably use the same approach for Scalars, but we can do that in a separate PR.

@conradoplg conradoplg force-pushed the deserialize-error-on-identity branch 2 times, most recently from e70a5a7 to a52e04e Compare June 10, 2024 21:57
@conradoplg conradoplg force-pushed the deserialize-error-on-identity branch from a52e04e to 179347a Compare June 10, 2024 22:04
@conradoplg conradoplg marked this pull request as ready for review June 10, 2024 22:07
@conradoplg conradoplg changed the title WIP: return error when deserializing the identity return error when deserializing the identity Jun 10, 2024
@conradoplg conradoplg requested a review from natalieesk June 10, 2024 22:08
Copy link
Contributor

@natalieesk natalieesk left a comment

Choose a reason for hiding this comment

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

This is great

mergify bot added a commit that referenced this pull request Jun 19, 2024
@mergify mergify bot merged commit 8be644f into main Jun 19, 2024
14 checks passed
@mergify mergify bot deleted the deserialize-error-on-identity branch June 19, 2024 13:21
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.

Reject identity in Group::serialize
2 participants