diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-03-30 11:00:05 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-03-31 15:49:57 -0700 |
| commit | d4a2c941809f303b97d153e06ba07e95cd245f88 (patch) | |
| tree | f876f056ff60aeac3f0098deb2dbe1fabfd13091 /src/libstd/net/tcp.rs | |
| parent | d754722a04b99fdcae0fd97fa2a4395521145ef2 (diff) | |
| download | rust-d4a2c941809f303b97d153e06ba07e95cd245f88.tar.gz rust-d4a2c941809f303b97d153e06ba07e95cd245f88.zip | |
std: Clean out #[deprecated] APIs
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
Diffstat (limited to 'src/libstd/net/tcp.rs')
| -rw-r--r-- | src/libstd/net/tcp.rs | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index 869faa795f9..9611e40e1e9 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -101,13 +101,6 @@ impl TcpStream { } /// Returns the socket address of the local half of this TCP connection. - #[unstable(feature = "net")] - #[deprecated(since = "1.0.0", reason = "renamed to local_addr")] - pub fn socket_addr(&self) -> io::Result<SocketAddr> { - self.0.socket_addr() - } - - /// Returns the socket address of the local half of this TCP connection. #[stable(feature = "rust1", since = "1.0.0")] pub fn local_addr(&self) -> io::Result<SocketAddr> { self.0.socket_addr() @@ -195,13 +188,6 @@ impl TcpListener { self.0.socket_addr() } - /// Deprecated, renamed to local_addr - #[unstable(feature = "net")] - #[deprecated(since = "1.0.0", reason = "renamed to local_addr")] - pub fn socket_addr(&self) -> io::Result<SocketAddr> { - self.0.socket_addr() - } - /// Create a new independently owned handle to the underlying socket. /// /// The returned `TcpListener` is a reference to the same socket that this @@ -349,7 +335,7 @@ mod tests { let _t = thread::spawn(move|| { let mut stream = t!(TcpStream::connect(&addr)); t!(stream.write(&[99])); - tx.send(t!(stream.socket_addr())).unwrap(); + tx.send(t!(stream.local_addr())).unwrap(); }); let (mut stream, addr) = t!(acceptor.accept()); @@ -499,7 +485,7 @@ mod tests { fn socket_and_peer_name_ip4() { each_ip(&mut |addr| { let listener = t!(TcpListener::bind(&addr)); - let so_name = t!(listener.socket_addr()); + let so_name = t!(listener.local_addr()); assert_eq!(addr, so_name); let _t = thread::spawn(move|| { t!(listener.accept()); |
