1
Fork 0

update tcp stream documentation

This commit is contained in:
Charles Hathaway 2018-10-10 11:13:35 -04:00
parent 2243fabd8f
commit c514b627e4
No known key found for this signature in database
GPG key ID: 31A4C28E20B425BB

View file

@ -44,11 +44,10 @@ use time::Duration;
/// use std::net::TcpStream; /// 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 /// stream.write(&[1])?;
/// let _ = stream.write(&[1]); /// stream.read(&mut [0; 128])?;
/// let _ = stream.read(&mut [0; 128]); // ignore here too
/// } // the stream is closed here /// } // the stream is closed here
/// ``` /// ```
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]