From df6aad2be4c6c5d11483f20e62d41e71f0ac989e Mon Sep 17 00:00:00 2001 From: hozan23 Date: Wed, 13 Mar 2024 12:33:34 +0100 Subject: net: major cleanup and improvement of the crate api --- net/src/connection.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'net/src/connection.rs') diff --git a/net/src/connection.rs b/net/src/connection.rs index ea73a39..fa4640f 100644 --- a/net/src/connection.rs +++ b/net/src/connection.rs @@ -57,9 +57,9 @@ pub trait Connection: Send + Sync { /// pub async fn dial(endpoint: &Endpoint) -> Result { match endpoint { - Endpoint::Tcp(_, _) => Ok(Box::new(tcp::dial_tcp(endpoint).await?)), - Endpoint::Udp(_, _) => Ok(Box::new(udp::dial_udp(endpoint).await?)), - Endpoint::Unix(addr) => Ok(Box::new(unix::dial_unix(addr).await?)), + Endpoint::Tcp(_, _) => Ok(Box::new(tcp::dial(endpoint).await?)), + Endpoint::Udp(_, _) => Ok(Box::new(udp::dial(endpoint).await?)), + Endpoint::Unix(addr) => Ok(Box::new(unix::dial(addr).await?)), _ => Err(Error::InvalidEndpoint(endpoint.to_string())), } } -- cgit v1.2.3