Remove unused UdpSocketNew

This commit is contained in:
Alex Crichton
2016-09-09 09:47:35 -07:00
parent 8f92dc9d56
commit b2ae5ac7c9
2 changed files with 2 additions and 17 deletions
+1 -1
View File
@@ -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;
+1 -16
View File
@@ -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<mio::udp::UdpSocket>,
}
/// Future returned from `UdpSocket::bind` which will resolve to a `UdpSocket`.
pub struct UdpSocketNew {
inner: IoFuture<UdpSocket>,
}
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<UdpSocket, io::Error> {
self.inner.poll()
}
}
#[cfg(unix)]
mod sys {
use std::os::unix::prelude::*;