diff --git a/tokio/src/net/tcp/socket.rs b/tokio/src/net/tcp/socket.rs index c528a14fe8e..8ecf9f71253 100644 --- a/tokio/src/net/tcp/socket.rs +++ b/tokio/src/net/tcp/socket.rs @@ -425,7 +425,7 @@ impl TcpSocket { /// # async fn dox() -> Result<(), Box> { /// let socket = TcpSocket::new_v4()?; /// - /// println!("{:?}", socket.nodelay()?); + /// socket.set_nodelay(true)?; /// # Ok(()) /// # } /// ``` @@ -445,9 +445,9 @@ impl TcpSocket { /// use tokio::net::TcpSocket; /// /// # async fn dox() -> Result<(), Box> { - /// let stream = TcpSocket::new_v4()?; + /// let socket = TcpSocket::new_v4()?; /// - /// stream.set_nodelay(true)?; + /// println!("{:?}", socket.nodelay()?); /// # Ok(()) /// # } /// ```