From 4dd94d0f90272387008f59ca9118635099e67199 Mon Sep 17 00:00:00 2001 From: Boris Sabatier Date: Tue, 9 Jan 2024 10:03:55 +0100 Subject: [PATCH] Fix cfg flag for tcp tests --- tarpc/src/serde_transport.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tarpc/src/serde_transport.rs b/tarpc/src/serde_transport.rs index 9b3c9d61..ef2d16a6 100644 --- a/tarpc/src/serde_transport.rs +++ b/tarpc/src/serde_transport.rs @@ -655,7 +655,7 @@ mod tests { ); } - #[cfg(tcp)] + #[cfg(feature = "tcp")] #[tokio::test] async fn tcp() -> io::Result<()> { use super::tcp; @@ -674,12 +674,12 @@ mod tests { Ok(()) } - #[cfg(tcp)] + #[cfg(feature = "tcp")] #[tokio::test] async fn tcp_on_existing_transport() -> io::Result<()> { use super::tcp; - let transport = TcpListener::bind("0.0.0.0:0").await?; + let transport = tokio::net::TcpListener::bind("0.0.0.0:0").await?; let mut listener = tcp::listen_on(transport, SymmetricalJson::::default).await?; let addr = listener.local_addr(); tokio::spawn(async move {