Remove io::read_error

The general idea is to remove conditions completely from I/O, so in the meantime
remove the read_error condition to mean the same thing as the io_error condition.
This commit is contained in:
Alex Crichton
2013-10-18 11:52:23 -07:00
parent e117aa0e2a
commit 6b70ddfba1
9 changed files with 42 additions and 52 deletions

View File

@@ -93,7 +93,7 @@ pub fn expand_include_str(cx: @ExtCtxt, sp: Span, tts: &[ast::token_tree])
let file = get_single_str_from_tts(cx, sp, tts, "include_str!");
let file = res_rel_file(cx, sp, &Path::new(file));
let mut error = None;
let bytes = do io::read_error::cond.trap(|e| error = Some(e)).inside {
let bytes = do io::io_error::cond.trap(|e| error = Some(e)).inside {
file.open_reader(io::Open).read_to_end()
};
match error {
@@ -120,10 +120,8 @@ pub fn expand_include_bin(cx: @ExtCtxt, sp: Span, tts: &[ast::token_tree])
let file = res_rel_file(cx, sp, &Path::new(file));
let mut error = None;
let bytes = do io::read_error::cond.trap(|e| error = Some(e)).inside {
do io::io_error::cond.trap(|e| error = Some(e)).inside {
file.open_reader(io::Open).read_to_end()
}
let bytes = do io::io_error::cond.trap(|e| error = Some(e)).inside {
file.open_reader(io::Open).read_to_end()
};
match error {
Some(e) => {