]> git.lizzy.rs Git - connect-rs.git/blobdiff - src/tcp/client.rs
make async-oriented, remove block_on
[connect-rs.git] / src / tcp / client.rs
index 354f7bb18880a13acb416b16e4f813e1ee802f38..221825da27399ad7ab477a13be1a979b7179abcf 100644 (file)
@@ -4,7 +4,9 @@ use crate::Connection;
 use async_std::net::{TcpStream, ToSocketAddrs};
 
 impl Connection {
-    pub async fn tcp_client<A: ToSocketAddrs + std::fmt::Display>(ip_addrs: A) -> anyhow::Result<Self> {
+    pub async fn tcp_client<A: ToSocketAddrs + std::fmt::Display>(
+        ip_addrs: A,
+    ) -> anyhow::Result<Self> {
         let stream = TcpStream::connect(&ip_addrs).await?;
         info!("Established client TCP connection to {}", ip_addrs);