Skip to content

Commit

Permalink
fix: change function name
Browse files Browse the repository at this point in the history
  • Loading branch information
PanGan21 committed May 18, 2024
1 parent cda394e commit 6873650
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/wait.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ fn resolve_address(url: &str) -> Result<SocketAddr> {

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);
}
}
Expand Down Expand Up @@ -117,7 +118,7 @@ fn socket_addr_from_host_and_port(host: &str, port: u16) -> Result<SocketAddr> {
}

/// Construct a `SocketAddr` from a url
fn socket_addr_from_url(url: &str) -> Result<SocketAddr> {
fn socket_addr_from_domain(url: &str) -> Result<SocketAddr> {
let addr = url
.to_socket_addrs()
.map_err(|e| WaitServiceError::Io(e))?
Expand Down

0 comments on commit 6873650

Please sign in to comment.