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

Can the to_allocvec function ever return an Err? #132

Open
mitchmindtree opened this issue Mar 24, 2024 · 0 comments
Open

Can the to_allocvec function ever return an Err? #132

mitchmindtree opened this issue Mar 24, 2024 · 0 comments

Comments

@mitchmindtree
Copy link

mitchmindtree commented Mar 24, 2024

I noticed that the to_allocvec function returns a Result, but I'm curious under what cases it can actually produce an error? It looks like the Flavour implementation cannot fail, and the only serialization-related error variants are related to OOM which I don't think AllocVec's Flavour implementation attempts to catch.

Is including a Result in the return type more for backwards-compatibility in case the implementation changes in the future?

Also, thanks for your work on postcard!

Edit: I guess there's always the possibility that a Serialize implementation produces a custom error, but I'm more curious if there are any known possible failure cases with the standard types and regular derive implementations 🤔

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

No branches or pull requests

1 participant