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

Make EncoderConfig non_exhaustive #2608

Closed
wants to merge 1 commit into from

Conversation

est31
Copy link
Contributor

@est31 est31 commented Dec 9, 2020

This allows changing it in the future without performing an API breaking
change.

This allows changing it in the future without performing an API breaking
change.
@lu-zero
Copy link
Collaborator

lu-zero commented Dec 9, 2020

It is probably a good idea, but the current implementation in rust seems to trip in exactly the pattern that makes possible to write code w/out caring about additional fields...

@est31
Copy link
Contributor Author

est31 commented Dec 9, 2020

Oh indeed, I've thought the ..Default::default pattern still works with non_exhaustive, but seems it's disallowed. Apparently so that you are allowed to add private fields in the future...

Should I close this?

@lu-zero
Copy link
Collaborator

lu-zero commented Dec 9, 2020

At least for now, it seems that it has more cons than pros sadly =/

@est31
Copy link
Contributor Author

est31 commented Dec 9, 2020

Ok then! Btw, I'm interested in this struct because of #151.

@est31 est31 closed this Dec 9, 2020
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.

2 participants