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

Provide a condition in string-based IO routines #5399

Closed
wants to merge 1 commit into from
Closed

Provide a condition in string-based IO routines #5399

wants to merge 1 commit into from

Conversation

sonwow
Copy link
Contributor

@sonwow sonwow commented Mar 15, 2013

Part of Issue #4837

Rust's string-based IO routines should provide a condition for hooking in different behavior when presented with malformed UTF-8.

*/
const strict: uint = 1;
const replacement: uint = 2;
const ignore: uint = 3;
Copy link
Member

Choose a reason for hiding this comment

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

This is probably better as an enum (enum UTF8Mode { Strict, Replacement, Ignore }), unless there was a particular reason for using the constants?

@sonwow
Copy link
Contributor Author

sonwow commented Mar 28, 2013

Thank you for your comment. I will do that according to your comment.

@sonwow sonwow closed this Mar 28, 2013
oli-obk pushed a commit to oli-obk/rust that referenced this pull request May 2, 2020
Add lint named implicit_saturating_sub

Fixes: rust-lang#5399
I've made a basic skeleton of the lint, would love more feedback on how to make it better.
changelog: Add lint [`implicit_saturating_sub`]
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