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

migrate to actix-service 0.2

This commit is contained in:
Nikolay Kim
2019-02-01 20:18:44 -08:00
parent 76866f054f
commit 3269e35722
16 changed files with 460 additions and 75 deletions

View File

@ -30,11 +30,11 @@ session = ["cookie/secure"]
[dependencies]
actix-codec = "0.1"
actix-service = "0.1.6"
actix-service = "0.2.0"
actix-rt = "0.1.0"
actix-server = "0.1.0"
actix-server = "0.2.0"
actix-utils = "0.2.0"
actix-http = { path=".." }
actix-utils = { git = "https://github.com/actix/actix-net.git" }
base64 = "0.10"
bytes = "0.4"

View File

@ -57,7 +57,8 @@ impl TestServer {
pub fn with_factory<F: StreamServiceFactory>(
factory: F,
) -> TestServerRuntime<
impl Service<Connect, Response = impl Connection, Error = ConnectorError> + Clone,
impl Service<Request = Connect, Response = impl Connection, Error = ConnectorError>
+ Clone,
> {
let (tx, rx) = mpsc::channel();
@ -89,8 +90,11 @@ impl TestServer {
}
fn new_connector(
) -> impl Service<Connect, Response = impl Connection, Error = ConnectorError> + Clone
{
) -> impl Service<
Request = Connect,
Response = impl Connection,
Error = ConnectorError,
> + Clone {
#[cfg(feature = "ssl")]
{
use openssl::ssl::{SslConnector, SslMethod, SslVerifyMode};
@ -191,7 +195,7 @@ impl<T> TestServerRuntime<T> {
impl<T> TestServerRuntime<T>
where
T: Service<Connect, Error = ConnectorError> + Clone,
T: Service<Request = Connect, Error = ConnectorError> + Clone,
T::Response: Connection,
{
/// Connect to websocket server at a given path