From 76e952830302271e07a4be9df6dfaa1c11e3e675 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Wed, 13 Mar 2024 03:35:09 +0100 Subject: net: pass `Endpoint` to dial and listen functions --- net/src/listener.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/src/listener.rs') diff --git a/net/src/listener.rs b/net/src/listener.rs index f12f33e..7f6709a 100644 --- a/net/src/listener.rs +++ b/net/src/listener.rs @@ -39,7 +39,7 @@ pub trait ConnListener: Send + Sync { /// ``` pub async fn listen(endpoint: &Endpoint) -> Result> { match endpoint { - Endpoint::Tcp(addr, port) => Ok(Box::new(tcp::listen_tcp(addr, port).await?)), + Endpoint::Tcp(_, _) => Ok(Box::new(tcp::listen_tcp(endpoint).await?)), Endpoint::Unix(addr) => Ok(Box::new(unix::listen_unix(addr)?)), _ => Err(Error::InvalidEndpoint(endpoint.to_string())), } -- cgit v1.2.3