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

No appropriate DecodeError for invalid data when alloc not enabled #622

Closed
LLFourn opened this issue Mar 17, 2023 · 2 comments
Closed

No appropriate DecodeError for invalid data when alloc not enabled #622

LLFourn opened this issue Mar 17, 2023 · 2 comments

Comments

@LLFourn
Copy link

LLFourn commented Mar 17, 2023

The only appropriate error for when you try and decode invalid bytes for your type is DecodeError::OtherString but this only exists when alloc is enabled. I think there should be an option for those without allocators. Something like InvalidEncoding { expected: &'static str } would be sufficient.

@VictorKoenders
Copy link
Contributor

I think this is already fixed in #602

@LLFourn
Copy link
Author

LLFourn commented Mar 20, 2023

Woops. That's perfect thanks.

Looking forward to the next release candidate :)

@LLFourn LLFourn closed this as completed Mar 20, 2023
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

2 participants