1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-11-30 18:34:36 +01:00
This commit is contained in:
Nikolay Kim 2019-03-29 14:27:22 -07:00
parent aebeb511cd
commit 5eb3f1154e

View File

@ -3,7 +3,7 @@ use std::io::Write;
use std::rc::Rc; use std::rc::Rc;
use std::{fmt, str}; use std::{fmt, str};
use actix_codec::{AsyncRead, AsyncWrite, Framed}; use actix_codec::Framed;
use actix_http::{ws, Payload, RequestHead}; use actix_http::{ws, Payload, RequestHead};
use bytes::{BufMut, BytesMut}; use bytes::{BufMut, BytesMut};
#[cfg(feature = "cookies")] #[cfg(feature = "cookies")]
@ -13,6 +13,7 @@ use tokio_timer::Timeout;
pub use actix_http::ws::{CloseCode, CloseReason, Frame, Message}; pub use actix_http::ws::{CloseCode, CloseReason, Frame, Message};
use crate::connect::BoxedSocket;
use crate::error::{InvalidUrl, SendRequestError, WsClientError}; use crate::error::{InvalidUrl, SendRequestError, WsClientError};
use crate::http::header::{ use crate::http::header::{
self, HeaderName, HeaderValue, IntoHeaderValue, AUTHORIZATION, self, HeaderName, HeaderValue, IntoHeaderValue, AUTHORIZATION,
@ -213,10 +214,7 @@ impl WebsocketsRequest {
pub fn connect( pub fn connect(
mut self, mut self,
) -> impl Future< ) -> impl Future<
Item = ( Item = (ClientResponse, Framed<BoxedSocket, ws::Codec>),
ClientResponse,
Framed<impl AsyncRead + AsyncWrite, ws::Codec>,
),
Error = WsClientError, Error = WsClientError,
> { > {
if let Some(e) = self.err.take() { if let Some(e) = self.err.take() {