update tcp stream documentation
This commit is contained in:
parent
2243fabd8f
commit
c514b627e4
1 changed files with 3 additions and 4 deletions
|
@ -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")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue