diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2014-08-18 08:29:44 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2014-08-18 09:19:10 -0700 |
| commit | 67deb2e65e150a1b9b2fcd457da47e3e13b2c4f7 (patch) | |
| tree | 37fe9cab468b9f6757ca415f42a072a59012ee1e /src/libnative/io/util.rs | |
| parent | 7074592ee1ad1a155919268229b6464f2acc576e (diff) | |
| download | rust-67deb2e65e150a1b9b2fcd457da47e3e13b2c4f7.tar.gz rust-67deb2e65e150a1b9b2fcd457da47e3e13b2c4f7.zip | |
libsyntax: Remove the `use foo = bar` syntax from the language in favor
of `use bar as foo`. Change all uses of `use foo = bar` to `use bar as foo`. Implements RFC #47. Closes #16461. [breaking-change]
Diffstat (limited to 'src/libnative/io/util.rs')
| -rw-r--r-- | src/libnative/io/util.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libnative/io/util.rs b/src/libnative/io/util.rs index 97518bbf199..356805d91de 100644 --- a/src/libnative/io/util.rs +++ b/src/libnative/io/util.rs @@ -25,8 +25,8 @@ pub enum SocketStatus { } pub fn timeout(desc: &'static str) -> IoError { - #[cfg(unix)] use ERROR = libc::ETIMEDOUT; - #[cfg(windows)] use ERROR = libc::ERROR_OPERATION_ABORTED; + #[cfg(unix)] use libc::ETIMEDOUT as ERROR; + #[cfg(windows)] use libc::ERROR_OPERATION_ABORTED as ERROR; IoError { code: ERROR as uint, extra: 0, @@ -35,8 +35,8 @@ pub fn timeout(desc: &'static str) -> IoError { } pub fn short_write(n: uint, desc: &'static str) -> IoError { - #[cfg(unix)] use ERROR = libc::EAGAIN; - #[cfg(windows)] use ERROR = libc::ERROR_OPERATION_ABORTED; + #[cfg(unix)] use libc::EAGAIN as ERROR; + #[cfg(windows)] use libc::ERROR_OPERATION_ABORTED as ERROR; IoError { code: ERROR as uint, extra: n, @@ -102,10 +102,10 @@ pub fn connect_timeout(fd: net::sock_t, len: libc::socklen_t, timeout_ms: u64) -> IoResult<()> { use std::os; - #[cfg(unix)] use INPROGRESS = libc::EINPROGRESS; - #[cfg(windows)] use INPROGRESS = libc::WSAEINPROGRESS; - #[cfg(unix)] use WOULDBLOCK = libc::EWOULDBLOCK; - #[cfg(windows)] use WOULDBLOCK = libc::WSAEWOULDBLOCK; + #[cfg(unix)] use libc::EINPROGRESS as INPROGRESS; + #[cfg(windows)] use libc::WSAEINPROGRESS as INPROGRESS; + #[cfg(unix)] use libc::EWOULDBLOCK as WOULDBLOCK; + #[cfg(windows)] use libc::WSAEWOULDBLOCK as WOULDBLOCK; // Make sure the call to connect() doesn't block try!(set_nonblocking(fd, true)); |
