remove override. update actix-rt and actix-tls

This commit is contained in:
fakeshadow 2021-03-29 16:49:44 +08:00
parent d9265ac3df
commit 5a42e9f699
9 changed files with 25 additions and 23 deletions

View File

@ -80,11 +80,11 @@ required-features = ["rustls"]
actix-codec = "0.4.0-beta.1" actix-codec = "0.4.0-beta.1"
actix-macros = "0.2.0" actix-macros = "0.2.0"
actix-router = "0.2.7" actix-router = "0.2.7"
actix-rt = "2.1" actix-rt = "2.2"
actix-server = "2.0.0-beta.3" actix-server = "2.0.0-beta.3"
actix-service = "2.0.0-beta.4" actix-service = "2.0.0-beta.4"
actix-utils = "3.0.0-beta.2" actix-utils = "3.0.0-beta.2"
actix-tls = { version = "3.0.0-beta.4", default-features = false, optional = true } actix-tls = { version = "3.0.0-beta.5", default-features = false, optional = true }
actix-web-codegen = "0.5.0-beta.2" actix-web-codegen = "0.5.0-beta.2"
actix-http = "3.0.0-beta.4" actix-http = "3.0.0-beta.4"
@ -135,9 +135,6 @@ 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

@ -33,5 +33,5 @@ mime_guess = "2.0.1"
percent-encoding = "2.1" percent-encoding = "2.1"
[dev-dependencies] [dev-dependencies]
actix-rt = "2.1" actix-rt = "2.2"
actix-web = "4.0.0-beta.4" actix-web = "4.0.0-beta.4"

View File

@ -31,9 +31,9 @@ openssl = ["tls-openssl", "awc/openssl"]
[dependencies] [dependencies]
actix-service = "2.0.0-beta.4" actix-service = "2.0.0-beta.4"
actix-codec = "0.4.0-beta.1" actix-codec = "0.4.0-beta.1"
actix-tls = "3.0.0-beta.4" actix-tls = "3.0.0-beta.5"
actix-utils = "3.0.0-beta.2" actix-utils = "3.0.0-beta.2"
actix-rt = "2.1" actix-rt = "2.2"
actix-server = "2.0.0-beta.3" actix-server = "2.0.0-beta.3"
awc = { version = "3.0.0-beta.3", default-features = false } awc = { version = "3.0.0-beta.3", default-features = false }

View File

@ -47,8 +47,8 @@ trust-dns = ["trust-dns-resolver"]
actix-service = "2.0.0-beta.4" actix-service = "2.0.0-beta.4"
actix-codec = "0.4.0-beta.1" actix-codec = "0.4.0-beta.1"
actix-utils = "3.0.0-beta.2" actix-utils = "3.0.0-beta.2"
actix-rt = "2.1" actix-rt = "2.2"
actix-tls = "3.0.0-beta.4" actix-tls = "3.0.0-beta.5"
ahash = "0.7" ahash = "0.7"
base64 = "0.13" base64 = "0.13"
@ -89,7 +89,7 @@ trust-dns-resolver = { version = "0.20.0", optional = true }
[dev-dependencies] [dev-dependencies]
actix-server = "2.0.0-beta.3" actix-server = "2.0.0-beta.3"
actix-http-test = { version = "3.0.0-beta.3", features = ["openssl"] } actix-http-test = { version = "3.0.0-beta.3", features = ["openssl"] }
actix-tls = { version = "3.0.0-beta.4", features = ["openssl"] } actix-tls = { version = "3.0.0-beta.5", features = ["openssl"] }
criterion = "0.3" criterion = "0.3"
env_logger = "0.8" env_logger = "0.8"
rcgen = "0.8" rcgen = "0.8"

View File

@ -119,7 +119,7 @@ impl<S> Connector<S> {
/// Use custom connector. /// Use custom connector.
pub fn connector<S1, Io1>(self, connector: S1) -> Connector<S1> pub fn connector<S1, Io1>(self, connector: S1) -> Connector<S1>
where where
Io1: ConnectionIo + fmt::Debug, Io1: ActixStream + fmt::Debug + 'static,
S1: Service< S1: Service<
TcpConnect<Uri>, TcpConnect<Uri>,
Response = TcpConnection<Uri, Io1>, Response = TcpConnection<Uri, Io1>,
@ -136,7 +136,14 @@ impl<S> Connector<S> {
impl<S, Io> Connector<S> impl<S, Io> Connector<S>
where where
Io: ConnectionIo + ActixStream + fmt::Debug, // Note:
// Input Io type is bound to ActixStream trait but internally in client module they
// are bound to ConnectionIo trait alias. And latter is the trait exposed to public
// in the form of Box<dyn ConnectionIo> type.
//
// This remap is to hide ActixStream's trait methods. They are not meant to be called
// from user code.
Io: ActixStream + fmt::Debug + 'static,
S: Service< S: Service<
TcpConnect<Uri>, TcpConnect<Uri>,
Response = TcpConnection<Uri, Io>, Response = TcpConnection<Uri, Io>,
@ -407,16 +414,14 @@ struct TlsConnectorService<S, St> {
timeout: Duration, timeout: Duration,
} }
impl<S, St, Io, Res> Service<Connect> for TlsConnectorService<S, St> impl<S, St, Io> Service<Connect> for TlsConnectorService<S, St>
where where
S: Service<Connect, Response = TcpConnection<Uri, Io>, Error = ConnectError> S: Service<Connect, Response = TcpConnection<Uri, Io>, Error = ConnectError>
+ Clone + Clone
+ 'static, + 'static,
St: Service<TcpConnection<Uri, Io>, Response = Res, Error = std::io::Error> St: Service<TcpConnection<Uri, Io>, Error = std::io::Error> + Clone + 'static,
+ Clone
+ 'static,
Io: ConnectionIo, Io: ConnectionIo,
Res: IntoConnectionIo, St::Response: IntoConnectionIo,
{ {
type Response = (Box<dyn ConnectionIo>, Protocol); type Response = (Box<dyn ConnectionIo>, Protocol);
type Error = ConnectError; type Error = ConnectError;
@ -471,10 +476,10 @@ where
Error = std::io::Error, Error = std::io::Error,
Future = Fut2, Future = Fut2,
>, >,
S::Response: IntoConnectionIo,
Fut1: Future<Output = Result<TcpConnection<Uri, Io>, ConnectError>>, Fut1: Future<Output = Result<TcpConnection<Uri, Io>, ConnectError>>,
Fut2: Future<Output = Result<S::Response, S::Error>>, Fut2: Future<Output = Result<S::Response, S::Error>>,
Io: ConnectionIo, Io: ConnectionIo,
Res: IntoConnectionIo,
{ {
type Output = Result<(Box<dyn ConnectionIo>, Protocol), ConnectError>; type Output = Result<(Box<dyn ConnectionIo>, Protocol), ConnectError>;

View File

@ -28,7 +28,7 @@ mime = "0.3"
twoway = "0.2" twoway = "0.2"
[dev-dependencies] [dev-dependencies]
actix-rt = "2.1" actix-rt = "2.2"
actix-http = "3.0.0-beta.4" actix-http = "3.0.0-beta.4"
tokio = { version = "1", features = ["sync"] } tokio = { version = "1", features = ["sync"] }
tokio-stream = "0.1" tokio-stream = "0.1"

View File

@ -28,6 +28,6 @@ pin-project = "1.0.0"
tokio = { version = "1", features = ["sync"] } tokio = { version = "1", features = ["sync"] }
[dev-dependencies] [dev-dependencies]
actix-rt = "2.1" actix-rt = "2.2"
env_logger = "0.8" env_logger = "0.8"
futures-util = { version = "0.3.7", default-features = false } futures-util = { version = "0.3.7", default-features = false }

View File

@ -19,7 +19,7 @@ syn = { version = "1", features = ["full", "parsing"] }
proc-macro2 = "1" proc-macro2 = "1"
[dev-dependencies] [dev-dependencies]
actix-rt = "2.1" actix-rt = "2.2"
actix-web = "4.0.0-beta.4" actix-web = "4.0.0-beta.4"
futures-util = { version = "0.3.7", default-features = false } futures-util = { version = "0.3.7", default-features = false }
trybuild = "1" trybuild = "1"

View File

@ -71,7 +71,7 @@ actix-http = { version = "3.0.0-beta.4", features = ["openssl"] }
actix-http-test = { version = "3.0.0-beta.3", features = ["openssl"] } actix-http-test = { version = "3.0.0-beta.3", features = ["openssl"] }
actix-utils = "3.0.0-beta.1" actix-utils = "3.0.0-beta.1"
actix-server = "2.0.0-beta.3" actix-server = "2.0.0-beta.3"
actix-tls = { version = "3.0.0-beta.4", features = ["openssl", "rustls"] } actix-tls = { version = "3.0.0-beta.5", features = ["openssl", "rustls"] }
brotli2 = "0.3.2" brotli2 = "0.3.2"
env_logger = "0.8" env_logger = "0.8"