aboutsummaryrefslogtreecommitdiff
path: root/net/src/connection.rs
diff options
context:
space:
mode:
authorhozan23 <hozan23@proton.me>2024-03-13 12:33:34 +0100
committerhozan23 <hozan23@proton.me>2024-03-13 12:33:34 +0100
commitdf6aad2be4c6c5d11483f20e62d41e71f0ac989e (patch)
treebbbc8db330d254eab993f7e3e4bbdbcbb0b3ec6e /net/src/connection.rs
parent76e952830302271e07a4be9df6dfaa1c11e3e675 (diff)
net: major cleanup and improvement of the crate api
Diffstat (limited to 'net/src/connection.rs')
-rw-r--r--net/src/connection.rs6
1 files changed, 3 insertions, 3 deletions
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<Conn> {
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())),
}
}