update tcp stream documentation

上级 2243fabd
......@@ -44,11 +44,10 @@
/// 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")]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册