diff --git a/Cargo.toml b/Cargo.toml index aba3c654..28720beb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,8 +60,8 @@ rustls = ["actix-tls/rustls", "awc/rustls", "rust-tls"] [dependencies] actix-codec = "0.2.0" -actix-service = "1.0.0" -actix-utils = "1.0.3" +actix-service = "1.0.1" +actix-utils = "1.0.4" actix-router = "0.2.0" actix-rt = "1.0.0" actix-server = "1.0.0" diff --git a/actix-cors/Cargo.toml b/actix-cors/Cargo.toml index 392168e4..3fcd92f4 100644 --- a/actix-cors/Cargo.toml +++ b/actix-cors/Cargo.toml @@ -18,7 +18,7 @@ path = "src/lib.rs" [dependencies] actix-web = "2.0.0-rc" -actix-service = "1.0.0" +actix-service = "1.0.1" derive_more = "0.99.2" futures = "0.3.1" diff --git a/actix-files/Cargo.toml b/actix-files/Cargo.toml index 6920a309..104eb3df 100644 --- a/actix-files/Cargo.toml +++ b/actix-files/Cargo.toml @@ -20,7 +20,7 @@ path = "src/lib.rs" [dependencies] actix-web = { version = "2.0.0-rc", default-features = false } actix-http = "1.0.1" -actix-service = "1.0.0" +actix-service = "1.0.1" bitflags = "1" bytes = "0.5.3" futures = "0.3.1" diff --git a/actix-files/src/lib.rs b/actix-files/src/lib.rs index ac26f70c..4d111e8a 100644 --- a/actix-files/src/lib.rs +++ b/actix-files/src/lib.rs @@ -178,7 +178,9 @@ fn directory_listing( if dir.is_visible(&entry) { let entry = entry.unwrap(); let p = match entry.path().strip_prefix(&dir.path) { - Ok(p) if cfg!(windows) => base.join(p).to_string_lossy().replace("\\", "/"), + Ok(p) if cfg!(windows) => { + base.join(p).to_string_lossy().replace("\\", "/") + } Ok(p) => base.join(p).to_string_lossy().into_owned(), Err(_) => continue, }; diff --git a/actix-framed/Cargo.toml b/actix-framed/Cargo.toml index 8848bff2..8466e4a8 100644 --- a/actix-framed/Cargo.toml +++ b/actix-framed/Cargo.toml @@ -21,10 +21,10 @@ path = "src/lib.rs" [dependencies] actix-codec = "0.2.0" -actix-service = "1.0.0" +actix-service = "1.0.1" actix-router = "0.2.0" actix-rt = "1.0.0" -actix-http = "1.0.0" +actix-http = "1.0.1" bytes = "0.5.3" futures = "0.3.1" diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index 8512b250..367dbafe 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -40,7 +40,7 @@ failure = ["fail-ure"] secure-cookies = ["ring"] [dependencies] -actix-service = "1.0.0" +actix-service = "1.0.1" actix-codec = "0.2.0" actix-connect = "1.0.1" actix-utils = "1.0.3" diff --git a/actix-identity/Cargo.toml b/actix-identity/Cargo.toml index a5058b8c..b30246f0 100644 --- a/actix-identity/Cargo.toml +++ b/actix-identity/Cargo.toml @@ -18,7 +18,7 @@ path = "src/lib.rs" [dependencies] actix-web = { version = "2.0.0-rc", default-features = false, features = ["secure-cookies"] } -actix-service = "1.0.0" +actix-service = "1.0.1" futures = "0.3.1" serde = "1.0" serde_json = "1.0" diff --git a/actix-multipart/Cargo.toml b/actix-multipart/Cargo.toml index bbf83ed0..6c683cb1 100644 --- a/actix-multipart/Cargo.toml +++ b/actix-multipart/Cargo.toml @@ -17,7 +17,7 @@ path = "src/lib.rs" [dependencies] actix-web = { version = "2.0.0-rc", default-features = false } -actix-service = "1.0.0" +actix-service = "1.0.1" actix-utils = "1.0.3" bytes = "0.5.3" derive_more = "0.99.2" diff --git a/actix-session/Cargo.toml b/actix-session/Cargo.toml index ed80174f..5989cc0d 100644 --- a/actix-session/Cargo.toml +++ b/actix-session/Cargo.toml @@ -23,7 +23,7 @@ cookie-session = ["actix-web/secure-cookies"] [dependencies] actix-web = "2.0.0-rc" -actix-service = "1.0.0" +actix-service = "1.0.1" bytes = "0.5.3" derive_more = "0.99.2" futures = "0.3.1" diff --git a/awc/Cargo.toml b/awc/Cargo.toml index 723cd59d..67e0a3ee 100644 --- a/awc/Cargo.toml +++ b/awc/Cargo.toml @@ -35,7 +35,7 @@ compress = ["actix-http/compress"] [dependencies] actix-codec = "0.2.0" -actix-service = "1.0.0" +actix-service = "1.0.1" actix-http = "1.0.0" actix-rt = "1.0.0" diff --git a/awc/tests/test_client.rs b/awc/tests/test_client.rs index af63c816..69e40ad2 100644 --- a/awc/tests/test_client.rs +++ b/awc/tests/test_client.rs @@ -172,8 +172,7 @@ async fn test_connection_reuse() { .and_then( HttpService::new(map_config( App::new() - .service(web::resource("/").route(web::to(|| HttpResponse::Ok()))) - .into_factory(), + .service(web::resource("/").route(web::to(|| HttpResponse::Ok()))), |_| AppConfig::default(), )) .tcp(), @@ -210,8 +209,7 @@ async fn test_connection_force_close() { .and_then( HttpService::new(map_config( App::new() - .service(web::resource("/").route(web::to(|| HttpResponse::Ok()))) - .into_factory(), + .service(web::resource("/").route(web::to(|| HttpResponse::Ok()))), |_| AppConfig::default(), )) .tcp(), @@ -239,25 +237,23 @@ async fn test_connection_server_close() { let num = Arc::new(AtomicUsize::new(0)); let num2 = num.clone(); - let srv = - test_server(move || { - let num2 = num2.clone(); - pipeline_factory(move |io| { - num2.fetch_add(1, Ordering::Relaxed); - ok(io) - }) - .and_then( - HttpService::new(map_config( - App::new() - .service(web::resource("/").route(web::to(|| { - HttpResponse::Ok().force_close().finish() - }))) - .into_factory(), - |_| AppConfig::default(), - )) - .tcp(), - ) - }); + let srv = test_server(move || { + let num2 = num2.clone(); + pipeline_factory(move |io| { + num2.fetch_add(1, Ordering::Relaxed); + ok(io) + }) + .and_then( + HttpService::new(map_config( + App::new().service( + web::resource("/") + .route(web::to(|| HttpResponse::Ok().force_close().finish())), + ), + |_| AppConfig::default(), + )) + .tcp(), + ) + }); let client = awc::Client::default(); @@ -288,12 +284,9 @@ async fn test_connection_wait_queue() { }) .and_then( HttpService::new(map_config( - App::new() - .service( - web::resource("/") - .route(web::to(|| HttpResponse::Ok().body(STR))), - ) - .into_factory(), + App::new().service( + web::resource("/").route(web::to(|| HttpResponse::Ok().body(STR))), + ), |_| AppConfig::default(), )) .tcp(), @@ -330,25 +323,23 @@ async fn test_connection_wait_queue_force_close() { let num = Arc::new(AtomicUsize::new(0)); let num2 = num.clone(); - let srv = - test_server(move || { - let num2 = num2.clone(); - pipeline_factory(move |io| { - num2.fetch_add(1, Ordering::Relaxed); - ok(io) - }) - .and_then( - HttpService::new(map_config( - App::new() - .service(web::resource("/").route(web::to(|| { - HttpResponse::Ok().force_close().body(STR) - }))) - .into_factory(), - |_| AppConfig::default(), - )) - .tcp(), - ) - }); + let srv = test_server(move || { + let num2 = num2.clone(); + pipeline_factory(move |io| { + num2.fetch_add(1, Ordering::Relaxed); + ok(io) + }) + .and_then( + HttpService::new(map_config( + App::new().service( + web::resource("/") + .route(web::to(|| HttpResponse::Ok().force_close().body(STR))), + ), + |_| AppConfig::default(), + )) + .tcp(), + ) + }); let client = awc::Client::build() .connector(awc::Connector::new().limit(1).finish()) diff --git a/awc/tests/test_rustls_client.rs b/awc/tests/test_rustls_client.rs index 68acf7f7..5170555f 100644 --- a/awc/tests/test_rustls_client.rs +++ b/awc/tests/test_rustls_client.rs @@ -63,11 +63,9 @@ async fn _test_connection_reuse_h2() { .and_then( HttpService::build() .h2(map_config( - App::new() - .service( - web::resource("/").route(web::to(|| HttpResponse::Ok())), - ) - .into_factory(), + App::new().service( + web::resource("/").route(web::to(|| HttpResponse::Ok())), + ), |_| AppConfig::default(), )) .openssl(ssl_acceptor()) diff --git a/awc/tests/test_ssl_client.rs b/awc/tests/test_ssl_client.rs index 8edc83a9..94a061ac 100644 --- a/awc/tests/test_ssl_client.rs +++ b/awc/tests/test_ssl_client.rs @@ -45,11 +45,9 @@ async fn test_connection_reuse_h2() { .and_then( HttpService::build() .h2(map_config( - App::new() - .service( - web::resource("/").route(web::to(|| HttpResponse::Ok())), - ) - .into_factory(), + App::new().service( + web::resource("/").route(web::to(|| HttpResponse::Ok())), + ), |_| AppConfig::default(), )) .openssl(ssl_acceptor()) diff --git a/src/server.rs b/src/server.rs index 2830f874..f460afe4 100644 --- a/src/server.rs +++ b/src/server.rs @@ -2,13 +2,9 @@ use std::marker::PhantomData; use std::sync::{Arc, Mutex}; use std::{fmt, io, net}; -use actix_http::{ - body::MessageBody, Error, HttpService, KeepAlive, Request, Response, -}; +use actix_http::{body::MessageBody, Error, HttpService, KeepAlive, Request, Response}; use actix_server::{Server, ServerBuilder}; -use actix_service::{ - map_config, IntoServiceFactory, Service, ServiceFactory, -}; +use actix_service::{map_config, IntoServiceFactory, Service, ServiceFactory}; use net2::TcpBuilder; @@ -266,7 +262,7 @@ where .keep_alive(c.keep_alive) .client_timeout(c.client_timeout) .local_addr(addr) - .finish(map_config(factory().into_factory(), move |_| cfg.clone())) + .finish(map_config(factory(), move |_| cfg.clone())) .tcp() }, )?; @@ -313,7 +309,7 @@ where .keep_alive(c.keep_alive) .client_timeout(c.client_timeout) .client_disconnect(c.client_shutdown) - .finish(map_config(factory().into_factory(), move |_| cfg.clone())) + .finish(map_config(factory(), move |_| cfg.clone())) .openssl(acceptor.clone()) }, )?; @@ -360,7 +356,7 @@ where .keep_alive(c.keep_alive) .client_timeout(c.client_timeout) .client_disconnect(c.client_shutdown) - .finish(map_config(factory().into_factory(), move |_| cfg.clone())) + .finish(map_config(factory(), move |_| cfg.clone())) .rustls(config.clone()) }, )?; @@ -483,9 +479,7 @@ where HttpService::build() .keep_alive(c.keep_alive) .client_timeout(c.client_timeout) - .finish(map_config(factory().into_factory(), move |_| { - config.clone() - })), + .finish(map_config(factory(), move |_| config.clone())), ) })?; Ok(self) @@ -527,9 +521,7 @@ where HttpService::build() .keep_alive(c.keep_alive) .client_timeout(c.client_timeout) - .finish(map_config(factory().into_factory(), move |_| { - config.clone() - })), + .finish(map_config(factory(), move |_| config.clone())), ) }, )?; diff --git a/src/test.rs b/src/test.rs index 2aa7e142..912e9b47 100644 --- a/src/test.rs +++ b/src/test.rs @@ -634,7 +634,7 @@ where AppConfig::new(false, local_addr, format!("{}", local_addr)); HttpService::build() .client_timeout(ctimeout) - .h1(map_config(factory().into_factory(), move |_| cfg.clone())) + .h1(map_config(factory(), move |_| cfg.clone())) .tcp() }), HttpVer::Http2 => builder.listen("test", tcp, move || { @@ -642,7 +642,7 @@ where AppConfig::new(false, local_addr, format!("{}", local_addr)); HttpService::build() .client_timeout(ctimeout) - .h2(map_config(factory().into_factory(), move |_| cfg.clone())) + .h2(map_config(factory(), move |_| cfg.clone())) .tcp() }), HttpVer::Both => builder.listen("test", tcp, move || { @@ -650,9 +650,7 @@ where AppConfig::new(false, local_addr, format!("{}", local_addr)); HttpService::build() .client_timeout(ctimeout) - .finish(map_config(factory().into_factory(), move |_| { - cfg.clone() - })) + .finish(map_config(factory(), move |_| cfg.clone())) .tcp() }), }, @@ -663,7 +661,7 @@ where AppConfig::new(true, local_addr, format!("{}", local_addr)); HttpService::build() .client_timeout(ctimeout) - .h1(map_config(factory().into_factory(), move |_| cfg.clone())) + .h1(map_config(factory(), move |_| cfg.clone())) .openssl(acceptor.clone()) }), HttpVer::Http2 => builder.listen("test", tcp, move || { @@ -671,7 +669,7 @@ where AppConfig::new(true, local_addr, format!("{}", local_addr)); HttpService::build() .client_timeout(ctimeout) - .h2(map_config(factory().into_factory(), move |_| cfg.clone())) + .h2(map_config(factory(), move |_| cfg.clone())) .openssl(acceptor.clone()) }), HttpVer::Both => builder.listen("test", tcp, move || { @@ -679,9 +677,7 @@ where AppConfig::new(true, local_addr, format!("{}", local_addr)); HttpService::build() .client_timeout(ctimeout) - .finish(map_config(factory().into_factory(), move |_| { - cfg.clone() - })) + .finish(map_config(factory(), move |_| cfg.clone())) .openssl(acceptor.clone()) }), }, @@ -692,7 +688,7 @@ where AppConfig::new(true, local_addr, format!("{}", local_addr)); HttpService::build() .client_timeout(ctimeout) - .h1(map_config(factory().into_factory(), move |_| cfg.clone())) + .h1(map_config(factory(), move |_| cfg.clone())) .rustls(config.clone()) }), HttpVer::Http2 => builder.listen("test", tcp, move || { @@ -700,7 +696,7 @@ where AppConfig::new(true, local_addr, format!("{}", local_addr)); HttpService::build() .client_timeout(ctimeout) - .h2(map_config(factory().into_factory(), move |_| cfg.clone())) + .h2(map_config(factory(), move |_| cfg.clone())) .rustls(config.clone()) }), HttpVer::Both => builder.listen("test", tcp, move || { @@ -708,9 +704,7 @@ where AppConfig::new(true, local_addr, format!("{}", local_addr)); HttpService::build() .client_timeout(ctimeout) - .finish(map_config(factory().into_factory(), move |_| { - cfg.clone() - })) + .finish(map_config(factory(), move |_| cfg.clone())) .rustls(config.clone()) }), }, diff --git a/test-server/Cargo.toml b/test-server/Cargo.toml index 54cd0168..52a2da8d 100644 --- a/test-server/Cargo.toml +++ b/test-server/Cargo.toml @@ -30,7 +30,7 @@ default = [] openssl = ["open-ssl", "awc/openssl"] [dependencies] -actix-service = "1.0.0" +actix-service = "1.0.1" actix-codec = "0.2.0" actix-connect = "1.0.0" actix-utils = "1.0.3"