From ceb22faacf79b2f601f1f6652edc7b89dc999e17 Mon Sep 17 00:00:00 2001 From: Bruno Bigras Date: Wed, 24 May 2017 10:13:21 -0400 Subject: [PATCH] fix sample code in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a391934..e80a54c 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,12 @@ Lightweight stream-based WebSocket implementation for [Rust](http://www.rust-lan let server = TcpListener::bind("127.0.0.1:9001").unwrap(); for stream in server.incoming() { spawn (move || { - let mut websocket = accept(stream.unwrap()); + let mut websocket = accept(stream.unwrap()).unwrap(); loop { let msg = websocket.read_message().unwrap(); websocket.write_message(msg).unwrap(); } - }) + }); } ```