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(neon): Require TryFromJs::Error to implement TryIntoJs #1076

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

kjvalencik
Copy link
Member

@kjvalencik kjvalencik commented Oct 2, 2024

Additionally:

  • Replace TryFromJs::from_js implementations with a default
  • Add a json::Error wrapper to hide implementation details

This will be important for implementing TryFromJs on either::Either. Without this requirement, we would either need a cx.try_catch(..) or to discard the Left error in the TryFromJs::from_js implementation.

Copy link
Collaborator

@dherman dherman left a comment

Choose a reason for hiding this comment

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

Nice improvements! Great catch on hiding the Serde implementation.

Additionally:
* Replace `TryFromJs::from_js` implementations with a default
* Add a `json::Error` wrapper to hide implementation details
@kjvalencik kjvalencik merged commit d79788a into main Oct 7, 2024
22 checks passed
@kjvalencik kjvalencik deleted the kv/try-from-error branch October 7, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants