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

Use ok_or_else instead of ok_or in serde decoding #382

Merged

Conversation

jrose-signal
Copy link
Contributor

Serde errors are not simple enums; they format a full error string from their arguments. It's worth not doing that up front.

Serde errors are not simple enums; they format a full error string
from their arguments. It's worth not doing that up front.
@jrose-signal
Copy link
Contributor Author

Bumping this, it's free performance! (Also caught by cargo clippy --all-features, in addition to a less-interesting suggestion to use enumerate() for deserializing the 32-tuples representing scalars and points.)

@tarcieri tarcieri merged commit a63e14f into dalek-cryptography:main Mar 14, 2023
@tarcieri
Copy link
Contributor

Thanks!

@jrose-signal jrose-signal deleted the serde-deferred-errors branch March 14, 2023 17:22
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.

None yet

2 participants