about summary refs log tree commit diff
path: root/src/libnative
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-01-30 14:37:38 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-02-03 09:32:34 -0800
commit5878b1b76bee774b6d2f2f368ce216d9084d731c (patch)
tree4f5ff3f9bf5d900f6212cf3f520acbac133eefc9 /src/libnative
parent2053b695953e530ebddeba2b8c7547858bc2e43d (diff)
downloadrust-5878b1b76bee774b6d2f2f368ce216d9084d731c.tar.gz
rust-5878b1b76bee774b6d2f2f368ce216d9084d731c.zip
native: Remove io_error usage
Diffstat (limited to 'src/libnative')
-rw-r--r--src/libnative/io/file.rs11
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)
     }
 }