diff options
| author | Graydon Hoare <[email protected]> | 2011-04-13 12:05:04 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-04-13 12:05:15 -0700 |
| commit | 80a4b1ba534ed8d0d4a099349332e937d9c6775c (patch) | |
| tree | c4595ae8ad92d6075c38d316cccf2a80a2b06f6a /src | |
| parent | Remove code that is already in llvm for some time. (diff) | |
| download | rust-80a4b1ba534ed8d0d4a099349332e937d9c6775c.tar.xz rust-80a4b1ba534ed8d0d4a099349332e937d9c6775c.zip | |
Slight updates to match API drift in io, lib-io.rs passes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/io.rs | 2 | ||||
| -rw-r--r-- | src/test/run-pass/lib-io.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/io.rs b/src/lib/io.rs index 61f06795..41324509 100644 --- a/src/lib/io.rs +++ b/src/lib/io.rs @@ -115,7 +115,7 @@ state obj new_reader(buf_reader rdr) { // See _str.char_at val += ((b0 << ((w + 1u) as u8)) as uint) << ((w - 1u) * 6u - w - 1u); ret val as char; - } + } impure fn eof() -> bool { ret rdr.eof(); } diff --git a/src/test/run-pass/lib-io.rs b/src/test/run-pass/lib-io.rs index aab6713f..7102c91e 100644 --- a/src/test/run-pass/lib-io.rs +++ b/src/test/run-pass/lib-io.rs @@ -13,12 +13,12 @@ fn test_simple(str tmpfilebase) { log frood; { - let io.buf_writer out = io.new_buf_writer(tmpfile, vec(io.create)); - out.write(_str.bytes(frood)); + let io.writer out = io.file_writer(tmpfile, vec(io.create)); + out.write_str(frood); } - let io.buf_reader inp = io.new_buf_reader(tmpfile); - let str frood2 = _str.from_bytes(inp.read()); + let io.reader inp = io.file_reader(tmpfile); + let str frood2 = inp.read_c_str(); log frood2; check (_str.eq(frood, frood2)); } |