Skip to content

Commit

Permalink
Rollup merge of rust-lang#54965 - chathaway-codes:update-tcp-stream-d…
Browse files Browse the repository at this point in the history
…ocs, r=GuillaumeGomez

update tcp stream documentation

A small styling issue that seemed inconsistent here when compared to other places (such as https://doc.rust-lang.org/beta/std/net/struct.TcpListener.html).
  • Loading branch information
pietroalbini authored Oct 23, 2018
2 parents b4df53e + 4530b8c commit 6948e8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/libstd/net/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ use time::Duration;
/// use std::io::prelude::*;
/// use std::net::TcpStream;
///
/// {
/// let mut stream = TcpStream::connect("127.0.0.1:34254").unwrap();
/// fn main() -> std::io::Result<()> {
/// 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])?;
/// Ok(())
/// } // the stream is closed here
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
Expand Down

0 comments on commit 6948e8e

Please sign in to comment.