diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-01-30 14:37:38 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-02-03 09:32:34 -0800 |
| commit | 5878b1b76bee774b6d2f2f368ce216d9084d731c (patch) | |
| tree | 4f5ff3f9bf5d900f6212cf3f520acbac133eefc9 /src/libnative | |
| parent | 2053b695953e530ebddeba2b8c7547858bc2e43d (diff) | |
| download | rust-5878b1b76bee774b6d2f2f368ce216d9084d731c.tar.gz rust-5878b1b76bee774b6d2f2f368ce216d9084d731c.zip | |
native: Remove io_error usage
Diffstat (limited to 'src/libnative')
| -rw-r--r-- | src/libnative/io/file.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/libnative/io/file.rs b/src/libnative/io/file.rs index acab7ce3a91..72379275643 100644 --- a/src/libnative/io/file.rs +++ b/src/libnative/io/file.rs @@ -111,17 +111,14 @@ impl FileDesc { } impl io::Reader for FileDesc { - fn read(&mut self, buf: &mut [u8]) -> Option<uint> { - match self.inner_read(buf) { Ok(n) => Some(n), Err(..) => None } + fn read(&mut self, buf: &mut [u8]) -> io::IoResult<uint> { + self.inner_read(buf) } } impl io::Writer for FileDesc { - fn write(&mut self, buf: &[u8]) { - match self.inner_write(buf) { - Ok(()) => {} - Err(e) => { io::io_error::cond.raise(e); } - } + fn write(&mut self, buf: &[u8]) -> io::IoResult<()> { + self.inner_write(buf) } } |
