diff --git a/src/net/tcp.rs b/src/net/tcp.rs index 302c731c0..50d38e787 100644 --- a/src/net/tcp.rs +++ b/src/net/tcp.rs @@ -299,13 +299,13 @@ impl TcpStream { pub fn connect_std(stream: net::TcpStream, addr: &SocketAddr, handle: &Handle) - -> Box + Send> + -> TcpStreamNew { - let state = match mio::net::TcpStream::connect_stream(stream, addr) { + let inner = match mio::net::TcpStream::connect_stream(stream, addr) { Ok(tcp) => TcpStream::new(tcp, handle), Err(e) => TcpStreamNewState::Error(e), }; - Box::new(state) + TcpStreamNew { inner: inner } } /// Test whether this stream is ready to be read or not.