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

IgnoredAny doesn't handle enums, leading to a confusing error message #1558

Closed
jyc opened this issue Jun 26, 2019 · 2 comments · Fixed by #1559
Closed

IgnoredAny doesn't handle enums, leading to a confusing error message #1558

jyc opened this issue Jun 26, 2019 · 2 comments · Fixed by #1559

Comments

@jyc
Copy link

jyc commented Jun 26, 2019

If IgnoredAny gets an enum, serde outputs the error message "invalid type: enum, expected anything at all", which doesn't make much sense. This is because IgnoredAny doesn't have a visit_enum impl. I think the intent might make sense if IgnoredAny doesn't know how to deserialize the enum. But "expected anything at all" doesn't really make sense as an error when an enum is clearly something.

@jyc
Copy link
Author

jyc commented Jun 26, 2019

Actually, after thinking about it, I think this is always buggy behavior. If you agree I'd be happy to open a quick PR.

@dtolnay
Copy link
Member

dtolnay commented Jun 27, 2019

Thanks! I released 1.0.94 with a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants