Skip to content

Commit

Permalink
Use tokio built in dns
Browse files Browse the repository at this point in the history
  • Loading branch information
Danny Browning committed Oct 9, 2019
1 parent 3821e09 commit 46ac847
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ edition = "2018"

[features]
default = ["connect", "tls"]
connect = ["tokio-dns-unofficial", "tokio-net", "stream"]
connect = ["tokio-net", "stream"]
tls = ["tokio-tls", "native-tls", "stream", "tungstenite/tls"]
stream = ["bytes"]

Expand All @@ -37,11 +37,6 @@ version = "0.4.8"
optional = true
version = "0.2.0"

[dependencies.tokio-dns-unofficial]
optional = true
#version = "0.4.0"
git = "https://github.com/sbstp/tokio-dns.git"

[dependencies.tokio-net]
optional = true
version = "0.2.0-alpha.6"
Expand Down
2 changes: 1 addition & 1 deletion src/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ where
.port_or_known_default()
.expect("Bug: port unknown");

let try_socket = tokio_dns::TcpStream::connect((domain.as_str(), port)).await;
let try_socket = TcpStream::connect((domain.as_str(), port)).await;
let socket = try_socket.map_err(Error::Io)?;
client_async_tls(request, socket).await
}
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,5 @@ mod tests {

is_unpin::<WebSocketStream<tokio::net::TcpStream>>();
is_unpin::<WebSocketStream<AutoStream<tokio::net::TcpStream>>>();
is_unpin::<WebSocketStream<AutoStream<tokio_dns::TcpStream>>>();
}
}

0 comments on commit 46ac847

Please sign in to comment.