1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-27 17:52:56 +01:00

Fix doc api example

This commit is contained in:
Nikolay Kim 2018-06-21 14:11:00 +06:00 committed by GitHub
parent 58d1f4a4aa
commit b5594ae2a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,12 +25,12 @@
//!
//! // Handler for ws::Message messages
//! impl StreamHandler<ws::Message, ws::ProtocolError> for Ws {
//! fn handle(&mut self, msg: Result<Option<ws::Message>, ws::ProtocolError>, ctx: &mut Self::Context) {
//! fn handle(&mut self, msg: ws::Message, ctx: &mut Self::Context) {
//! match msg {
//! Ok(Some(ws::Message::Ping(msg))) => ctx.pong(&msg),
//! Ok(Some(ws::Message::Text(text))) => ctx.text(text),
//! Ok(Some(ws::Message::Binary(bin))) => ctx.binary(bin),
//! _ => ctx.stop(),
//! ws::Message::Ping(msg) => ctx.pong(&msg),
//! ws::Message::Text(text) => ctx.text(text),
//! ws::Message::Binary(bin) => ctx.binary(bin),
//! _ => (),
//! }
//! }
//! }