Are we sure that this is the correct design, as opposed to having read return 0 for EoF or perhaps returning None with a Result<Option<int>, IoError> return type?
After all, EOF is unlike all other I/O errors, since it is guaranteed to happen on all readers, and the fact that it needs to be special cased might be an indication that the design is wrong. Also, in addition to "raw" eof, a partial read due to end of file causes the same issues, so it seems that code needs to have two match conditions to handle eof, while it would only need a single one if eof was represented by Ok(0). _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev