From ce173fdc918c5934561560a97d366fce6edb36d0 Mon Sep 17 00:00:00 2001 From: Zahari Dichev Date: Sat, 24 Oct 2020 15:26:01 +0300 Subject: docs: update docs for `from_std` functions (#3016) Fixes: #3007 --- tokio/src/net/unix/datagram/socket.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tokio/src/net/unix/datagram/socket.rs') diff --git a/tokio/src/net/unix/datagram/socket.rs b/tokio/src/net/unix/datagram/socket.rs index 3ae66d1f..051c0d1e 100644 --- a/tokio/src/net/unix/datagram/socket.rs +++ b/tokio/src/net/unix/datagram/socket.rs @@ -149,11 +149,12 @@ impl UnixDatagram { Ok((a, b)) } - /// Consumes a `UnixDatagram` in the standard library and returns a - /// nonblocking `UnixDatagram` from this crate. + /// Creates new `UnixDatagram` from a `std::os::unix::net::UnixDatagram`. /// - /// The returned datagram will be associated with the given event loop - /// specified by `handle` and is ready to perform I/O. + /// This function is intended to be used to wrap a UnixDatagram from the + /// standard library in the Tokio equivalent. The conversion assumes + /// nothing about the underlying datagram; it is left up to the user to set + /// it in non-blocking mode. /// /// # Panics /// -- cgit v1.2.3