1
0
mirror of https://github.com/actix/actix-extras.git synced 2024-12-01 02:44:37 +01:00

update utils dep

This commit is contained in:
Nikolay Kim 2019-03-04 19:51:09 -08:00
parent a88b3b090d
commit 65a313c78b
2 changed files with 9 additions and 9 deletions

View File

@ -37,10 +37,10 @@ session = ["cookie/secure"]
ssl = ["openssl", "actix-connector/ssl"] ssl = ["openssl", "actix-connector/ssl"]
[dependencies] [dependencies]
actix-service = "0.3.0" actix-service = "0.3.1"
actix-codec = "0.1.0" actix-codec = "0.1.0"
actix-connector = "0.3.0" actix-connector = "0.3.0"
actix-utils = "0.3.0" actix-utils = "0.3.1"
base64 = "0.10" base64 = "0.10"
backtrace = "0.3" backtrace = "0.3"

View File

@ -2,7 +2,7 @@ use std::time::Duration;
use actix_codec::{AsyncRead, AsyncWrite}; use actix_codec::{AsyncRead, AsyncWrite};
use actix_connector::{Resolver, TcpConnector}; use actix_connector::{Resolver, TcpConnector};
use actix_service::{Apply, Service, ServiceExt}; use actix_service::{Service, ServiceExt};
use actix_utils::timeout::{TimeoutError, TimeoutService}; use actix_utils::timeout::{TimeoutError, TimeoutService};
use trust_dns_resolver::config::{ResolverConfig, ResolverOpts}; use trust_dns_resolver::config::{ResolverConfig, ResolverOpts};
@ -140,8 +140,8 @@ impl Connector {
> + Clone { > + Clone {
#[cfg(not(feature = "ssl"))] #[cfg(not(feature = "ssl"))]
{ {
let connector = Apply::new( let connector = TimeoutService::new(
TimeoutService::new(self.timeout), self.timeout,
self.resolver.map_err(ConnectorError::from).and_then( self.resolver.map_err(ConnectorError::from).and_then(
TcpConnector::default() TcpConnector::default()
.from_err() .from_err()
@ -168,8 +168,8 @@ impl Connector {
const H2: &[u8] = b"h2"; const H2: &[u8] = b"h2";
use actix_connector::ssl::OpensslConnector; use actix_connector::ssl::OpensslConnector;
let ssl_service = Apply::new( let ssl_service = TimeoutService::new(
TimeoutService::new(self.timeout), self.timeout,
self.resolver self.resolver
.clone() .clone()
.map_err(ConnectorError::from) .map_err(ConnectorError::from)
@ -197,8 +197,8 @@ impl Connector {
TimeoutError::Timeout => ConnectorError::Timeout, TimeoutError::Timeout => ConnectorError::Timeout,
}); });
let tcp_service = Apply::new( let tcp_service = TimeoutService::new(
TimeoutService::new(self.timeout), self.timeout,
self.resolver.map_err(ConnectorError::from).and_then( self.resolver.map_err(ConnectorError::from).and_then(
TcpConnector::default() TcpConnector::default()
.from_err() .from_err()