From caba37c41e1afa3f0f34010f6cf734b28c993922 Mon Sep 17 00:00:00 2001 From: Alexey Galakhov Date: Tue, 31 Jan 2017 19:22:08 +0100 Subject: [PATCH] trivial: fix client example --- examples/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/client.rs b/examples/client.rs index 2aa1336..064cb1f 100644 --- a/examples/client.rs +++ b/examples/client.rs @@ -5,7 +5,7 @@ extern crate env_logger; use url::Url; use ws2::protocol::Message; use ws2::client::connect; -use ws2::protocol::handshake::Handshake; +use ws2::handshake::Handshake; fn main() { env_logger::init().unwrap(); @@ -15,7 +15,7 @@ fn main() { .handshake_wait() .expect("Handshake error"); - socket.write_message(Message::Text("Hello WebSocket".into())); + socket.write_message(Message::Text("Hello WebSocket".into())).unwrap(); loop { let msg = socket.read_message().expect("Error reading message"); println!("Received: {}", msg);