Skip to content

core: io: the read_until function checks bytes not chars, so type should reflect that. - #5933

Merged
bors merged 1 commit into
rust-lang:incomingfrom
huonw:core-read-until-byte
Apr 18, 2013
Merged

core: io: the read_until function checks bytes not chars, so type should reflect that.#5933
bors merged 1 commit into
rust-lang:incomingfrom
huonw:core-read-until-byte

Conversation

@huonw

Copy link
Copy Markdown
Contributor

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.

fnmain(){
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.

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.
@borsbors closed this Apr 18, 2013
@bors
bors merged commit 19cc352 into rust-lang:incomingApr 18, 2013
@huonw
huonw deleted the core-read-until-byte branch April 19, 2013 07:26
flip1995 pushed a commit to flip1995/rust that referenced this pull request Aug 28, 2020
Fix false negative in `option_as_ref_deref`
Closesrust-lang#5927
changelog: Fix false negative in `option_as_ref_deref`
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
6613: Don't assume DidChangeTextDocument paths exist r=SomeoneToIgnore a=mjibson
Fixesrust-lang#5933
Co-authored-by: Matt Jibson <matt.jibson@gmail.com>
Sign up for freeto 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.

3 participants

@huonw@thestinger@bors