-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Description
In the io::reader
impl for *libc::FILE
, read_byte
returns -1 on EOF. This is not surprising since it just calls libc::fgetc
, but it's arguably wrong since callers are presumably going to use eof()
to check for EOF and thus shouldn't have to worry about dealing with a bogus trailing -1.
Instead, perhaps it could fail? I'm not really sure. Or maybe this is supposed to be a low-level interface, but it still seems weird for Rust code to have to deal with sentinel values like this.
Metadata
Metadata
Assignees
Labels
E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.