mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-20 00:00:08 +02:00
Rename networking constructors with _std
This commit renames the various constructors of networking types to have a `_std` suffix instead of a smorgasboard of other suffixes, canonicalizing on `_std` as the suffix for constructors which take the libstd corresponding types.
This commit is contained in:
@@ -79,7 +79,7 @@ fn worker(rx: mpsc::UnboundedReceiver<net::TcpStream>) {
|
||||
// using the `TcpStream::from_stream` API. After that the socket is not
|
||||
// a `tokio::net::TcpStream` meaning it's in nonblocking mode and
|
||||
// ready to be used with Tokio
|
||||
let socket = TcpStream::from_stream(socket, &handle)
|
||||
let socket = TcpStream::from_std(socket, &handle)
|
||||
.expect("failed to associate TCP stream");
|
||||
let addr = socket.peer_addr().expect("failed to get remote address");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user