diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-18 11:52:23 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-24 14:21:57 -0700 |
| commit | 6b70ddfba1ed5fca7fa67e5f2d2691e9c667d3a3 (patch) | |
| tree | c5f2dbd75d45048ff68121ac870bde1ae34d2cd3 /src/libstd/rt/io/net | |
| parent | e117aa0e2a4121aab101cb7526a5e79812bfb76e (diff) | |
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.
Diffstat (limited to 'src/libstd/rt/io/net')
| -rw-r--r-- | src/libstd/rt/io/net/tcp.rs | 8 | ||||
| -rw-r--r-- | src/libstd/rt/io/net/udp.rs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/libstd/rt/io/net/tcp.rs b/src/libstd/rt/io/net/tcp.rs index 21f98c27296..4e841b36a5d 100644 --- a/src/libstd/rt/io/net/tcp.rs +++ b/src/libstd/rt/io/net/tcp.rs @@ -12,7 +12,7 @@ use option::{Option, Some, None}; use result::{Ok, Err}; use rt::io::net::ip::SocketAddr; use rt::io::{Reader, Writer, Listener, Acceptor}; -use rt::io::{io_error, read_error, EndOfFile}; +use rt::io::{io_error, EndOfFile}; use rt::rtio::{IoFactory, with_local_io, RtioSocket, RtioTcpListener, RtioTcpAcceptor, RtioTcpStream}; @@ -67,7 +67,7 @@ impl Reader for TcpStream { Err(ioerr) => { // EOF is indicated by returning None if ioerr.kind != EndOfFile { - read_error::cond.raise(ioerr); + io_error::cond.raise(ioerr); } return None; } @@ -308,7 +308,7 @@ mod test { let mut buf = [0]; let nread = stream.read(buf); assert!(nread.is_none()); - do read_error::cond.trap(|e| { + do io_error::cond.trap(|e| { if cfg!(windows) { assert_eq!(e.kind, NotConnected); } else { @@ -343,7 +343,7 @@ mod test { let mut buf = [0]; let nread = stream.read(buf); assert!(nread.is_none()); - do read_error::cond.trap(|e| { + do io_error::cond.trap(|e| { if cfg!(windows) { assert_eq!(e.kind, NotConnected); } else { diff --git a/src/libstd/rt/io/net/udp.rs b/src/libstd/rt/io/net/udp.rs index eee5dce7b6c..2e4ae95d98e 100644 --- a/src/libstd/rt/io/net/udp.rs +++ b/src/libstd/rt/io/net/udp.rs @@ -12,7 +12,7 @@ use option::{Option, Some, None}; use result::{Ok, Err}; use rt::io::net::ip::SocketAddr; use rt::io::{Reader, Writer}; -use rt::io::{io_error, read_error, EndOfFile}; +use rt::io::{io_error, EndOfFile}; use rt::rtio::{RtioSocket, RtioUdpSocket, IoFactory, with_local_io}; pub struct UdpSocket { @@ -38,7 +38,7 @@ impl UdpSocket { Err(ioerr) => { // EOF is indicated by returning None if ioerr.kind != EndOfFile { - read_error::cond.raise(ioerr); + io_error::cond.raise(ioerr); } None } |
