From 687365044aa6487854bb86c4cb77034e61233e6d Mon Sep 17 00:00:00 2001 From: PanGan21 Date: Sat, 18 May 2024 15:04:08 +0200 Subject: [PATCH] fix: change function name --- src/wait.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wait.rs b/src/wait.rs index 7ec311b..7a500e1 100644 --- a/src/wait.rs +++ b/src/wait.rs @@ -87,7 +87,8 @@ fn resolve_address(url: &str) -> Result { return Ok(addr); } else { - let addr = socket_addr_from_url(url)?; + // If there is no host then it is only domain + let addr = socket_addr_from_domain(url)?; return Ok(addr); } } @@ -117,7 +118,7 @@ fn socket_addr_from_host_and_port(host: &str, port: u16) -> Result { } /// Construct a `SocketAddr` from a url -fn socket_addr_from_url(url: &str) -> Result { +fn socket_addr_from_domain(url: &str) -> Result { let addr = url .to_socket_addrs() .map_err(|e| WaitServiceError::Io(e))?