Skip to content

Commit 15445e3

Browse files
author
Stjepan Glavina
committed
Remove re-exports in async_std::net
1 parent ddb4dc8 commit 15445e3

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

src/net/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
//! # }) }
3030
//! ```
3131
32-
pub use std::net::{SocketAddr, SocketAddrV4, SocketAddrV6};
33-
3432
pub use addr::ToSocketAddrs;
3533
pub use tcp::{Incoming, TcpListener, TcpStream};
3634
pub use udp::UdpSocket;

src/net/tcp/listener.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::net::SocketAddr;
12
use std::pin::Pin;
23

34
use cfg_if::cfg_if;
@@ -7,7 +8,7 @@ use super::TcpStream;
78
use crate::future::Future;
89
use crate::io;
910
use crate::net::driver::IoHandle;
10-
use crate::net::{SocketAddr, ToSocketAddrs};
11+
use crate::net::ToSocketAddrs;
1112
use crate::task::{Context, Poll};
1213

1314
/// A TCP socket server, listening for connections.

src/net/tcp/stream.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::io::{IoSlice, IoSliceMut};
22
use std::mem;
3+
use std::net::SocketAddr;
34
use std::pin::Pin;
45

56
use cfg_if::cfg_if;
@@ -8,7 +9,7 @@ use futures::io::{AsyncRead, AsyncWrite};
89

910
use crate::io;
1011
use crate::net::driver::IoHandle;
11-
use crate::net::{SocketAddr, ToSocketAddrs};
12+
use crate::net::ToSocketAddrs;
1213
use crate::task::{Context, Poll};
1314

1415
/// A TCP stream between a local and a remote socket.

src/net/udp/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
use std::io;
2+
use std::net::SocketAddr;
23

34
use cfg_if::cfg_if;
45
use futures::future;
56
use std::net::{Ipv4Addr, Ipv6Addr};
67

78
use crate::net::driver::IoHandle;
8-
use crate::net::{SocketAddr, ToSocketAddrs};
9+
use crate::net::ToSocketAddrs;
910
use crate::task::Poll;
1011

1112
/// A UDP socket.

tests/addr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use std::net::{Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6};
1+
use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6};
22

3-
use async_std::net::{SocketAddr, ToSocketAddrs};
3+
use async_std::net::ToSocketAddrs;
44
use async_std::task;
55

66
fn tsa<A: ToSocketAddrs>(a: A) -> Result<Vec<SocketAddr>, String> {

0 commit comments

Comments
 (0)