mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-19 00:00:09 +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:
@@ -81,7 +81,7 @@ fn worker(rx: mpsc::UnboundedReceiver<net::TcpStream>) {
|
||||
// request/response types instead of bytes. Here we'll just use our
|
||||
// framing defined below and then use the `send_all` helper to send the
|
||||
// responses back on the socket after we've processed them
|
||||
let socket = future::result(TcpStream::from_stream(socket, &handle));
|
||||
let socket = future::result(TcpStream::from_std(socket, &handle));
|
||||
let req = socket.and_then(|socket| {
|
||||
let (tx, rx) = socket.framed(Http).split();
|
||||
tx.send_all(rx.and_then(respond))
|
||||
|
||||
Reference in New Issue
Block a user