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

Possible for panic in Value::to_owned #63

Closed
KodrAus opened this issue May 28, 2023 · 0 comments · Fixed by #70
Closed

Possible for panic in Value::to_owned #63

KodrAus opened this issue May 28, 2023 · 0 comments · Fixed by #70

Comments

@KodrAus
Copy link
Contributor

KodrAus commented May 28, 2023

If a serde::Serialize or sval::Value impl fails when buffering to an OwnedValue we'll panic: https://github.com/sval-rs/value-bag/blob/main/src/internal/sval/v2.rs#L319

We should consider adding a Poison variant to OwnedValue that captures that error and fails when you attempt to use it instead of unwrapping.

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 a pull request may close this issue.

1 participant