-
Notifications
You must be signed in to change notification settings - Fork 59
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
Fix for rust commit 3dcd2157403163789aaf21a9ab3c4d30a7c6494d 'Switch to ... #60
Conversation
…to purely namespaced enums'
@@ -51,6 +51,9 @@ | |||
* then it can just discard the first sequence and can emit the fixed string on an error. | |||
* It still has to feed the input bytes starting at the second offset again. | |||
*/ | |||
pub use DecoderTrap::{DecodeStrict,DecodeReplace,DecodeIgnore,DecoderCall}; | |||
pub use EncoderTrap::{EncodeStrict,EncodeReplace,EncodeIgnore,EncodeNcrEscape,EncoderCall}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we take the opportunity to rename the variants, instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. What should they be renamed as?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the Decode
and Encode
prefixes on the variant names, but don’t re-export them. Take advantage on the new language feature! @lifthrasiir, what do you think? By the way, the language change is rust-lang/rust#18973
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you are suggesting to remove the re-export, and use the fully qualified name elsewhere. So, DecoderTrap::Strict
for example after the rename. Just making sure I'm thinking the same as you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no problem with renaming them. See the below for other comments.
Ideally a proper deprecation notice ( |
Switch to purely namespaced enums (not yet builds on nightly)
...purely namespaced enums'