Skip to content

Commit

Permalink
update tcp stream documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Hathaway committed Oct 10, 2018
1 parent 2243fab commit c514b62
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libstd/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ use time::Duration;
/// use std::net::TcpStream;
///
/// {
/// let mut stream = TcpStream::connect("127.0.0.1:34254").unwrap();
/// let mut stream = TcpStream::connect("127.0.0.1:34254")?;
///
/// // ignore the Result
/// let _ = stream.write(&[1]);
/// let _ = stream.read(&mut [0; 128]); // ignore here too
/// stream.write(&[1])?;
/// stream.read(&mut [0; 128])?;
/// } // the stream is closed here
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down

0 comments on commit c514b62

Please sign in to comment.