From 8fcce957cd0f8484e5ad078fc4ada244ea463fb0 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 5 Dec 2017 08:24:26 -0800 Subject: 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. --- examples/echo-threads.rs | 2 +- examples/tinyhttp.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/echo-threads.rs b/examples/echo-threads.rs index 4869d337..574a6be1 100644 --- a/examples/echo-threads.rs +++ b/examples/echo-threads.rs @@ -79,7 +79,7 @@ fn worker(rx: mpsc::UnboundedReceiver) { // 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"); diff --git a/examples/tinyhttp.rs b/examples/tinyhttp.rs index e0496928..085bb801 100644 --- a/examples/tinyhttp.rs +++ b/examples/tinyhttp.rs @@ -81,7 +81,7 @@ fn worker(rx: mpsc::UnboundedReceiver) { // 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)) -- cgit v1.2.3