Skip to content

Commit

Permalink
net: fix examples for TcpSocket::{set_nodelay,nodelay} (#6840)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminRi authored Sep 12, 2024
1 parent 0cea36f commit a249654
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tokio/src/net/tcp/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ impl TcpSocket {
/// # async fn dox() -> Result<(), Box<dyn std::error::Error>> {
/// let socket = TcpSocket::new_v4()?;
///
/// println!("{:?}", socket.nodelay()?);
/// socket.set_nodelay(true)?;
/// # Ok(())
/// # }
/// ```
Expand All @@ -445,9 +445,9 @@ impl TcpSocket {
/// use tokio::net::TcpSocket;
///
/// # async fn dox() -> Result<(), Box<dyn std::error::Error>> {
/// let stream = TcpSocket::new_v4()?;
/// let socket = TcpSocket::new_v4()?;
///
/// stream.set_nodelay(true)?;
/// println!("{:?}", socket.nodelay()?);
/// # Ok(())
/// # }
/// ```
Expand Down

0 comments on commit a249654

Please sign in to comment.