Fix build for next actix-rt and actix-tls-beta release

This commit is contained in:
fakeshadow 2021-03-27 20:23:29 +08:00
parent 60f9cfbb2a
commit d9265ac3df
3 changed files with 8 additions and 6 deletions

View File

@ -135,6 +135,9 @@ actix-multipart = { path = "actix-multipart" }
actix-files = { path = "actix-files" } actix-files = { path = "actix-files" }
awc = { path = "awc" } awc = { path = "awc" }
actix-tls = { git = "https://github.com/actix/actix-net.git" }
actix-rt = { git = "https://github.com/actix/actix-net.git" }
[[bench]] [[bench]]
name = "server" name = "server"
harness = false harness = false

View File

@ -9,7 +9,7 @@ use std::{
}; };
use actix_rt::{ use actix_rt::{
net::TcpStream, net::{ActixStream, TcpStream},
time::{sleep, Sleep}, time::{sleep, Sleep},
}; };
use actix_service::Service; use actix_service::Service;
@ -136,7 +136,7 @@ impl<S> Connector<S> {
impl<S, Io> Connector<S> impl<S, Io> Connector<S>
where where
Io: ConnectionIo + fmt::Debug, Io: ConnectionIo + ActixStream + fmt::Debug,
S: Service< S: Service<
TcpConnect<Uri>, TcpConnect<Uri>,
Response = TcpConnection<Uri, Io>, Response = TcpConnection<Uri, Io>,

View File

@ -4,12 +4,11 @@ use std::net::IpAddr;
use std::rc::Rc; use std::rc::Rc;
use std::time::Duration; use std::time::Duration;
use actix_codec::{AsyncRead, AsyncWrite};
use actix_http::{ use actix_http::{
client::{Connector, ConnectorService, TcpConnect, TcpConnectError, TcpConnection}, client::{Connector, ConnectorService, TcpConnect, TcpConnectError, TcpConnection},
http::{self, header, Error as HttpError, HeaderMap, HeaderName, Uri}, http::{self, header, Error as HttpError, HeaderMap, HeaderName, Uri},
}; };
use actix_rt::net::TcpStream; use actix_rt::net::{ActixStream, TcpStream};
use actix_service::{boxed, Service}; use actix_service::{boxed, Service};
use crate::connect::DefaultConnector; use crate::connect::DefaultConnector;
@ -64,7 +63,7 @@ where
S: Service<TcpConnect<Uri>, Response = TcpConnection<Uri, Io>, Error = TcpConnectError> S: Service<TcpConnect<Uri>, Response = TcpConnection<Uri, Io>, Error = TcpConnectError>
+ Clone + Clone
+ 'static, + 'static,
Io: AsyncRead + AsyncWrite + Unpin + fmt::Debug + 'static, Io: ActixStream + fmt::Debug + 'static,
{ {
/// Use custom connector service. /// Use custom connector service.
pub fn connector<S1, Io1>(self, connector: Connector<S1>) -> ClientBuilder<S1, M> pub fn connector<S1, Io1>(self, connector: Connector<S1>) -> ClientBuilder<S1, M>
@ -75,7 +74,7 @@ where
Error = TcpConnectError, Error = TcpConnectError,
> + Clone > + Clone
+ 'static, + 'static,
Io1: AsyncRead + AsyncWrite + Unpin + fmt::Debug + 'static, Io1: ActixStream + fmt::Debug + 'static,
{ {
ClientBuilder { ClientBuilder {
middleware: self.middleware, middleware: self.middleware,