diff options
author | Vitor Enes <vitorenesduarte@gmail.com> | 2020-01-28 22:07:51 +0000 |
---|---|---|
committer | Carl Lerche <me@carllerche.com> | 2020-01-28 14:07:51 -0800 |
commit | 64e4bd1b2fe0c0ef54044a4850f6108132bb694a (patch) | |
tree | a506567195339402bc63b53f5ca9ac5ad99863d3 /tokio/src/net/tcp/stream.rs | |
parent | 8ed209b6125cb85039f676f00a3ae1dee1e0b747 (diff) |
docs: minor fixes to `TcpStream` API docs (#2183)
Diffstat (limited to 'tokio/src/net/tcp/stream.rs')
-rw-r--r-- | tokio/src/net/tcp/stream.rs | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/tokio/src/net/tcp/stream.rs b/tokio/src/net/tcp/stream.rs index 081f6ea7..f9c2e98f 100644 --- a/tokio/src/net/tcp/stream.rs +++ b/tokio/src/net/tcp/stream.rs @@ -147,14 +147,6 @@ impl TcpStream { /// The runtime is usually set implicitly when this function is called /// from a future driven by a tokio runtime, otherwise runtime can be set /// explicitly with [`Handle::enter`](crate::runtime::Handle::enter) function. - /// - /// # Panics - /// - /// This function panics if thread-local runtime is not set. - /// - /// The runtime is usually set implicitly when this function is called - /// from a future driven by a tokio runtime, otherwise runtime can be set - /// explicitly with [`Handle::enter`](crate::runtime::Handle::enter) function. pub fn from_std(stream: net::TcpStream) -> io::Result<TcpStream> { let io = mio::net::TcpStream::from_stream(stream)?; let io = PollEvented::new(io)?; @@ -346,7 +338,7 @@ impl TcpStream { /// /// For more information about this option, see [`set_nodelay`]. /// - /// [`set_nodelay`]: #method.set_nodelay + /// [`set_nodelay`]: TcpStream::set_nodelay /// /// # Examples /// @@ -392,7 +384,7 @@ impl TcpStream { /// /// For more information about this option, see [`set_recv_buffer_size`]. /// - /// [`set_recv_buffer_size`]: #tymethod.set_recv_buffer_size + /// [`set_recv_buffer_size`]: TcpStream::set_recv_buffer_size /// /// # Examples /// @@ -433,18 +425,9 @@ impl TcpStream { /// Gets the value of the `SO_SNDBUF` option on this socket. /// - /// For more information about this option, see [`set_send_buffer`]. - /// - /// [`set_send_buffer`]: #tymethod.set_send_buffer - /// - /// # Examples - /// - /// Returns whether keepalive messages are enabled on this socket, and if so - /// the duration of time between them. - /// - /// For more information about this option, see [`set_keepalive`]. + /// For more information about this option, see [`set_send_buffer_size`]. /// - /// [`set_keepalive`]: #tymethod.set_keepalive + /// [`set_send_buffer_size`]: TcpStream::set_send_buffer_size /// /// # Examples /// @@ -488,7 +471,7 @@ impl TcpStream { /// /// For more information about this option, see [`set_keepalive`]. /// - /// [`set_keepalive`]: #tymethod.set_keepalive + /// [`set_keepalive`]: TcpStream::set_keepalive /// /// # Examples /// @@ -539,7 +522,7 @@ impl TcpStream { /// /// For more information about this option, see [`set_ttl`]. /// - /// [`set_ttl`]: #tymethod.set_ttl + /// [`set_ttl`]: TcpStream::set_ttl /// /// # Examples /// @@ -583,7 +566,7 @@ impl TcpStream { /// /// For more information about this option, see [`set_linger`]. /// - /// [`set_linger`]: #tymethod.set_linger + /// [`set_linger`]: TcpStream::set_linger /// /// # Examples /// |