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

support reading enums from config #85

Merged
merged 1 commit into from
Nov 28, 2018

Conversation

geniusisme
Copy link
Contributor

This fixes issue #74.

}
}

impl<'de> de::VariantAccess<'de> for EnumAccess {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding panics in this impl:

  • We already checked size of map, and one only can have VariantAcces from EnumAccess, which performs the check.
  • If visitor chooses wrong variant to visit, leading to unreachable!(), then it is a buggy visitor, this is not a failure one can/should recover from.

@geniusisme
Copy link
Contributor Author

I guess we need to upgrade to serde-hjson v0.8.2 and update error check. Can do in this pull request.

@mehcode
Copy link
Owner

mehcode commented Nov 28, 2018

Looks great. Thanks for this. Sorry for the delay in merging this. I'd love the update to hjson when you get time.

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 this pull request may close these issues.

None yet

2 participants