]> git.feebdaed.xyz Git - 0xmirror/tokio.git/commitdiff
net: clarify socket gets closed on drop (#7526)
authorNoam Soloveichik <inoamsol@gmail.com>
Mon, 11 Aug 2025 16:26:01 +0000 (19:26 +0300)
committerGitHub <noreply@github.com>
Mon, 11 Aug 2025 16:26:01 +0000 (16:26 +0000)
tokio/src/net/tcp/listener.rs

index 95a2469cc0731b603c5f30165b28ea6dafe9681f..c611dbddd2d94d01cfb2f9ae8f61bfa64bdf65f5 100644 (file)
@@ -19,6 +19,8 @@ cfg_net! {
     ///
     /// A `TcpListener` can be turned into a `Stream` with [`TcpListenerStream`].
     ///
+    /// The socket will be closed when the value is dropped.
+    ///
     /// [`TcpListenerStream`]: https://docs.rs/tokio-stream/0.1/tokio_stream/wrappers/struct.TcpListenerStream.html
     ///
     /// # Errors