summaryrefslogtreecommitdiffstats
path: root/examples/echo.rs
diff options
context:
space:
mode:
authorCarl Lerche <me@carllerche.com>2019-02-21 11:56:15 -0800
committerGitHub <noreply@github.com>2019-02-21 11:56:15 -0800
commit80162306e71c8561873a9c9496d65f2c1387d119 (patch)
tree83327ca8d9d1326d54e3c679e1fb4eb16775d4be /examples/echo.rs
parentab595d08253dd7ee0422144f8dafffa382700976 (diff)
chore: apply rustfmt to all crates (#917)
Diffstat (limited to 'examples/echo.rs')
-rw-r--r--examples/echo.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/echo.rs b/examples/echo.rs
index f33247cb..45f808f8 100644
--- a/examples/echo.rs
+++ b/examples/echo.rs
@@ -54,7 +54,8 @@ fn main() -> Result<(), Box<std::error::Error>> {
// connections made to the server). The return value of the `for_each`
// method is itself a future representing processing the entire stream of
// connections, and ends up being our server.
- let done = socket.incoming()
+ let done = socket
+ .incoming()
.map_err(|e| println!("failed to accept socket; error = {:?}", e))
.for_each(move |socket| {
// Once we're inside this closure this represents an accepted client
@@ -89,7 +90,6 @@ fn main() -> Result<(), Box<std::error::Error>> {
Ok(())
});
-
// And this is where much of the magic of this server happens. We
// crucially want all clients to make progress concurrently, rather than
// blocking one on completion of another. To achieve this we use the