core: io: the read_until function checks bytes not chars, so type should reflect that.#5933
Merged
bors merged 1 commit intorust-lang:incomingfrom Apr 18, 2013
Merged
Conversation
…uld reflect that.
bors
added a commit
that referenced
this pull request
Apr 18, 2013
`read_until` is just doing a bytewise comparison. This means the following program prints `xyå12`, not `xy`, which it should if it was actually checking chars.
```rust
fn main() {
do io::with_str_reader("xyå12") |r| {
io::println(r.read_until('å', false));
}
}
```
This patch makes the type of read_until match what it is actually doing.
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Aug 28, 2020
Fix false negative in `option_as_ref_deref` Closes rust-lang#5927 changelog: Fix false negative in `option_as_ref_deref`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
read_untilis just doing a bytewise comparison. This means the following program printsxyå12, notxy, which it should if it was actually checking chars.This patch makes the type of read_until match what it is actually doing.