From 5df5cc7374d451e0577c38a34ea819eaf921d5a9 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 26 Dec 2017 21:33:23 -0800 Subject: [PATCH] fix guide example --- .travis.yml | 8 +++++++- guide/src/qs_9.md | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 67d27b917..6251bcedb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,13 @@ before_script: - export PATH=$PATH:~/.cargo/bin script: - - USE_SKEPTIC=1 cargo test --features=alpn + - | + if [[ "$TRAVIS_RUST_VERSION" == "nightly-2017-12-21" ]]; then + USE_SKEPTIC=1 cargo test --features=alpn + else + cargo test --features=alpn + fi + - | if [[ "$TRAVIS_RUST_VERSION" == "beta" ]]; then cd examples/diesel && cargo check && cd ../.. diff --git a/guide/src/qs_9.md b/guide/src/qs_9.md index aa8bfd5f6..7feb7d94b 100644 --- a/guide/src/qs_9.md +++ b/guide/src/qs_9.md @@ -21,8 +21,8 @@ impl Actor for Ws { } /// Define Handler for ws::Message message -# impl StreamHandler for WsRoute {} -impl Handler for WsRoute { +# impl StreamHandler for Ws {} +impl Handler for Ws { fn handle(&mut self, msg: ws::Message, ctx: &mut HttpContext) -> Response { match msg { @@ -37,7 +37,7 @@ impl Handler for WsRoute { fn main() { Application::new() - .resource("/ws/", |r| r.f(|req| ws::start(req, WS)) // <- register websocket route + .resource("/ws/", |r| r.f(|req| ws::start(req, Ws))) // <- register websocket route .finish(); } ```