Skip to content

Commit

Permalink
removed unnecessary else from server url func
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsinhaparseable committed Apr 10, 2024
1 parent d29d373 commit fe350f3
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions server/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,10 @@ pub fn get_address() -> SocketAddr {
if hostname.starts_with('$') {
let var_hostname = hostname[1..].to_string();
hostname = get_from_env(&var_hostname);
} else {
hostname = hostname.to_string();
}
if port.starts_with('$') {
let var_port = port[1..].to_string();
port = get_from_env(&var_port);
} else {
hostname = hostname.to_string();
}
format!("{}:{}", hostname, port)
.parse::<SocketAddr>()
Expand Down

0 comments on commit fe350f3

Please sign in to comment.