7 lines
165 B
Rust
7 lines
165 B
Rust
pub async fn find_listen_addr() -> std::net::SocketAddr {
|
|
std::net::TcpListener::bind("localhost:0")
|
|
.unwrap()
|
|
.local_addr()
|
|
.unwrap()
|
|
}
|