async-graphql/integrations/tide/tests/test_utils.rs

7 lines
165 B
Rust

pub async fn find_listen_addr() -> std::net::SocketAddr {
std::net::TcpListener::bind("localhost:0")
.unwrap()
.local_addr()
.unwrap()
}