8 lines
185 B
Rust
8 lines
185 B
Rust
|
pub async fn find_port() -> async_std::net::SocketAddr {
|
||
|
async_std::net::TcpListener::bind("localhost:0")
|
||
|
.await
|
||
|
.unwrap()
|
||
|
.local_addr()
|
||
|
.unwrap()
|
||
|
}
|