Skip to content

Conversation

huonw
Copy link
Contributor

@huonw huonw commented 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.

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.

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.
@bors bors closed this Apr 18, 2013
@bors bors merged commit 19cc352 into rust-lang:incoming Apr 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`

Closes rust-lang#5927

changelog: Fix false negative in `option_as_ref_deref`
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.

3 participants