From 4530b8c56cb7c1e539472e09c1e2704f67814912 Mon Sep 17 00:00:00 2001 From: Charles Hathaway Date: Thu, 11 Oct 2018 15:35:48 -0400 Subject: [PATCH] Small changes to fix documentation auto compile issues --- src/libstd/net/tcp.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index 848570e75e71e..ad212a547579b 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -43,11 +43,12 @@ use time::Duration; /// use std::io::prelude::*; /// use std::net::TcpStream; /// -/// { +/// fn main() -> std::io::Result<()> { /// let mut stream = TcpStream::connect("127.0.0.1:34254")?; /// /// stream.write(&[1])?; /// stream.read(&mut [0; 128])?; +/// Ok(()) /// } // the stream is closed here /// ``` #[stable(feature = "rust1", since = "1.0.0")]