1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

update tests

This commit is contained in:
Nikolay Kim
2019-03-29 18:51:07 -07:00
parent 3a954298d7
commit 193f8fb2d9
7 changed files with 74 additions and 63 deletions

View File

@ -11,7 +11,7 @@ use cookie::{Cookie, CookieJar};
use futures::future::{err, Either, Future};
use tokio_timer::Timeout;
pub use actix_http::ws::{CloseCode, CloseReason, Frame, Message};
pub use actix_http::ws::{CloseCode, CloseReason, Codec, Frame, Message};
use crate::connect::BoxedSocket;
use crate::error::{InvalidUrl, SendRequestError, WsClientError};
@ -213,10 +213,8 @@ impl WebsocketsRequest {
/// Complete request construction and connect to a websockets server.
pub fn connect(
mut self,
) -> impl Future<
Item = (ClientResponse, Framed<BoxedSocket, ws::Codec>),
Error = WsClientError,
> {
) -> impl Future<Item = (ClientResponse, Framed<BoxedSocket, Codec>), Error = WsClientError>
{
if let Some(e) = self.err.take() {
return Either::A(err(e.into()));
}