From b2ae5ac7c924526ad1836dd5c127ce54751627cc Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 9 Sep 2016 09:47:35 -0700 Subject: [PATCH] Remove unused UdpSocketNew --- src/net/mod.rs | 2 +- src/net/udp.rs | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/src/net/mod.rs b/src/net/mod.rs index 56d43c4c9..159985c49 100644 --- a/src/net/mod.rs +++ b/src/net/mod.rs @@ -8,4 +8,4 @@ mod udp; pub use self::tcp::{TcpStream, TcpStreamNew}; pub use self::tcp::{TcpListener, Incoming}; -pub use self::udp::{UdpSocket, UdpSocketNew}; +pub use self::udp::UdpSocket; diff --git a/src/net/udp.rs b/src/net/udp.rs index a3ef6f30e..6d031623b 100644 --- a/src/net/udp.rs +++ b/src/net/udp.rs @@ -2,10 +2,9 @@ use std::io; use std::net::{self, SocketAddr, Ipv4Addr, Ipv6Addr}; use std::fmt; -use futures::{Future, Poll, Async}; +use futures::Async; use mio; -use io::IoFuture; use reactor::{Handle, PollEvented}; /// An I/O object representing a UDP socket. @@ -13,11 +12,6 @@ pub struct UdpSocket { io: PollEvented, } -/// Future returned from `UdpSocket::bind` which will resolve to a `UdpSocket`. -pub struct UdpSocketNew { - inner: IoFuture, -} - impl UdpSocket { /// Create a new UDP socket bound to the specified address. /// @@ -257,15 +251,6 @@ impl fmt::Debug for UdpSocket { } } -impl Future for UdpSocketNew { - type Item = UdpSocket; - type Error = io::Error; - - fn poll(&mut self) -> Poll { - self.inner.poll() - } -} - #[cfg(unix)] mod sys { use std::os::unix::prelude::*;