From 1c3b32169eefff2eef4a79ade2be20d9af7a673f Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 6 Jul 2018 12:07:16 +0600 Subject: [PATCH] remove stream from WebsocketsContext::with_factory --- src/ws/context.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/ws/context.rs b/src/ws/context.rs index 0444db99..ffdd0b55 100644 --- a/src/ws/context.rs +++ b/src/ws/context.rs @@ -110,11 +110,9 @@ where } /// Create a new Websocket context - pub fn with_factory(req: HttpRequest, stream: WsStream

, f: F) -> Body + pub fn with_factory(req: HttpRequest, f: F) -> Body where F: FnOnce(&mut Self) -> A + 'static, - A: StreamHandler, - P: Stream + 'static, { let mb = Mailbox::default(); let mut ctx = WebsocketContext { @@ -123,7 +121,6 @@ where request: req, disconnected: false, }; - ctx.add_stream(stream); let act = f(&mut ctx); Body::Actor(Box::new(WebsocketContextFut::new(ctx, act, mb)))