From aa5750cafc9d6bc96e098c338b70fa618149ffd5 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Thu, 6 Jun 2019 16:47:40 +0600 Subject: [PATCH] update actix-web to 1.0.0 --- actix_redis/Cargo.toml | 4 ++-- actix_todo/Cargo.toml | 6 +++--- async_db/Cargo.toml | 4 ++-- async_ex1/Cargo.toml | 4 ++-- async_ex2/Cargo.toml | 6 +++--- basics/Cargo.toml | 8 ++++---- cookie-auth/Cargo.toml | 2 +- cookie-session/Cargo.toml | 4 ++-- diesel/Cargo.toml | 2 +- error_handling/Cargo.toml | 2 +- form/Cargo.toml | 2 +- hello-world/Cargo.toml | 2 +- http-full-proxy/Cargo.toml | 2 +- http-proxy/Cargo.toml | 2 +- json/Cargo.toml | 2 +- jsonrpc/Cargo.toml | 4 ++-- juniper/Cargo.toml | 2 +- middleware/Cargo.toml | 4 ++-- multipart/Cargo.toml | 4 ++-- protobuf/Cargo.toml | 4 ++-- r2d2/Cargo.toml | 2 +- redis-session/Cargo.toml | 6 +++--- rustls/Cargo.toml | 4 ++-- simple-auth-server/Cargo.toml | 6 +++--- state/Cargo.toml | 2 +- state/src/main.rs | 8 ++++---- static_index/Cargo.toml | 4 ++-- template_askama/Cargo.toml | 2 +- template_tera/Cargo.toml | 2 +- template_yarte/Cargo.toml | 4 ++-- tls/Cargo.toml | 2 +- web-cors/backend/Cargo.toml | 2 +- websocket-chat/Cargo.toml | 8 ++++---- websocket-tcp-chat/Cargo.toml | 8 ++++---- websocket/Cargo.toml | 8 ++++---- 35 files changed, 69 insertions(+), 69 deletions(-) diff --git a/actix_redis/Cargo.toml b/actix_redis/Cargo.toml index 72140b6..2633ef2 100644 --- a/actix_redis/Cargo.toml +++ b/actix_redis/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" workspace = ".." [dependencies] -actix = "0.8.1" -actix-web = "1.0.0-beta.4" +actix = "0.8.2" +actix-web = "1.0.0" actix-redis = { git="https://github.com/actix/actix-redis.git" } futures = "0.1.23" redis-async = "0.4.0" diff --git a/actix_todo/Cargo.toml b/actix_todo/Cargo.toml index f7b70ad..754918b 100644 --- a/actix_todo/Cargo.toml +++ b/actix_todo/Cargo.toml @@ -6,9 +6,9 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-beta.5" -actix-files = "0.1.0-beta.4" -actix-session = "0.1.0-beta.4" +actix-web = "1.0.0" +actix-files = "0.1.1" +actix-session = "0.1.0" dotenv = "0.13.0" env_logger = "0.5.10" futures = "0.1.22" diff --git a/async_db/Cargo.toml b/async_db/Cargo.toml index 1612115..b7ef39f 100644 --- a/async_db/Cargo.toml +++ b/async_db/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" workspace = ".." [dependencies] -actix-rt = "0.2" -actix-web = "1.0.0-beta.4" +actix-rt = "0.2.2" +actix-web = "1.0.0" dotenv = "0.10" env_logger = "0.5" diff --git a/async_ex1/Cargo.toml b/async_ex1/Cargo.toml index a87eec9..e5b9716 100644 --- a/async_ex1/Cargo.toml +++ b/async_ex1/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" workspace = ".." [dependencies] -actix-rt = "0.2" -actix-web = { version="1.0.0-alpha.4", features=["ssl"] } +actix-rt = "0.2.2" +actix-web = { version="1.0.0", features=["ssl"] } futures = "0.1" serde = "1.0.43" diff --git a/async_ex2/Cargo.toml b/async_ex2/Cargo.toml index 0d7dab0..c1492b9 100644 --- a/async_ex2/Cargo.toml +++ b/async_ex2/Cargo.toml @@ -7,9 +7,9 @@ workspace = ".." [dependencies] actix-rt = "0.2.2" -actix-web = { version="1.0.0-beta.4", features=["ssl"] } -actix-multipart = "0.1.0-beta.1" -actix-service = "0.4.0" +actix-web = { version="1.0.0", features=["ssl"] } +actix-multipart = "0.1.1" +actix-service = "0.4.1" bytes = "0.4.12" env_logger = "0.6.1" futures = "0.1" diff --git a/basics/Cargo.toml b/basics/Cargo.toml index 6f20077..8dcf58c 100644 --- a/basics/Cargo.toml +++ b/basics/Cargo.toml @@ -6,10 +6,10 @@ workspace = ".." edition = "2018" [dependencies] -actix-rt = "0.2" -actix-web = "1.0.0-beta.4" -actix-files = "0.1.0-beta.4" -actix-session = "0.1.0-beta.4" +actix-rt = "0.2.2" +actix-web = "1.0.0" +actix-files = "0.1.1" +actix-session = "0.1.0" futures = "0.1.25" env_logger = "0.5" diff --git a/cookie-auth/Cargo.toml b/cookie-auth/Cargo.toml index 8024c93..dbc4d11 100644 --- a/cookie-auth/Cargo.toml +++ b/cookie-auth/Cargo.toml @@ -6,5 +6,5 @@ edition = "2018" workspace = ".." [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" env_logger = "0.6" diff --git a/cookie-session/Cargo.toml b/cookie-session/Cargo.toml index 0d926be..1e10ae4 100644 --- a/cookie-session/Cargo.toml +++ b/cookie-session/Cargo.toml @@ -6,8 +6,8 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-beta.4" -actix-session = "0.1.0-beta.4" +actix-web = "1.0.0" +actix-session = "0.1.0" futures = "0.1" time = "0.1" diff --git a/diesel/Cargo.toml b/diesel/Cargo.toml index 3bc1e55..5065ff3 100644 --- a/diesel/Cargo.toml +++ b/diesel/Cargo.toml @@ -6,7 +6,7 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" bytes = "0.4" env_logger = "0.6" diff --git a/error_handling/Cargo.toml b/error_handling/Cargo.toml index e892153..808e733 100644 --- a/error_handling/Cargo.toml +++ b/error_handling/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" workspace = ".." [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" derive_more = "0.14.0" futures = "0.1.23" diff --git a/form/Cargo.toml b/form/Cargo.toml index ed9467d..7a09f74 100644 --- a/form/Cargo.toml +++ b/form/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" workspace = ".." [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" serde = "1.0" serde_derive = "1.0" diff --git a/hello-world/Cargo.toml b/hello-world/Cargo.toml index 59ea15e..396062b 100644 --- a/hello-world/Cargo.toml +++ b/hello-world/Cargo.toml @@ -6,5 +6,5 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" env_logger = "0.6" diff --git a/http-full-proxy/Cargo.toml b/http-full-proxy/Cargo.toml index a193994..ddfe7b8 100644 --- a/http-full-proxy/Cargo.toml +++ b/http-full-proxy/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" [dependencies] actix-rt = "0.2" -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" clap = "2.32.0" futures = "0.1.25" diff --git a/http-proxy/Cargo.toml b/http-proxy/Cargo.toml index 718a346..bcb8039 100644 --- a/http-proxy/Cargo.toml +++ b/http-proxy/Cargo.toml @@ -15,7 +15,7 @@ path = "src/server.rs" [dependencies] actix-rt = "0.2" -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" env_logger = "0.5" futures = "0.1" diff --git a/json/Cargo.toml b/json/Cargo.toml index 7375e33..d7196f2 100644 --- a/json/Cargo.toml +++ b/json/Cargo.toml @@ -6,7 +6,7 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" bytes = "0.4" futures = "0.1" diff --git a/jsonrpc/Cargo.toml b/jsonrpc/Cargo.toml index 8b5978b..8b1a3dc 100644 --- a/jsonrpc/Cargo.toml +++ b/jsonrpc/Cargo.toml @@ -6,8 +6,8 @@ edition = "2018" workspace = ".." [dependencies] -actix = "0.8.1" -actix-web = "1.0.0-beta.4" +actix = "0.8.2" +actix-web = "1.0.0" env_logger = "0.6" futures = "0.1.23" futures-timer = "0.1" diff --git a/juniper/Cargo.toml b/juniper/Cargo.toml index 0d6c0f7..d3c0204 100644 --- a/juniper/Cargo.toml +++ b/juniper/Cargo.toml @@ -6,7 +6,7 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" env_logger = "0.6" futures = "0.1" serde = "1.0" diff --git a/middleware/Cargo.toml b/middleware/Cargo.toml index 8b9334f..76ecbf1 100644 --- a/middleware/Cargo.toml +++ b/middleware/Cargo.toml @@ -6,7 +6,7 @@ edition = "2018" workspace = ".." [dependencies] -actix-service = "0.4.0" -actix-web = "1.0.0-beta.4" +actix-service = "0.4.1" +actix-web = "1.0.0" futures = "0.1.25" env_logger = "0.6" \ No newline at end of file diff --git a/multipart/Cargo.toml b/multipart/Cargo.toml index 4c909d4..00089b0 100644 --- a/multipart/Cargo.toml +++ b/multipart/Cargo.toml @@ -10,8 +10,8 @@ name = "multipart" path = "src/main.rs" [dependencies] -actix-web = "1.0.0-beta.4" -actix-multipart = "0.1.0-beta.4" +actix-web = "1.0.0" +actix-multipart = "0.1.1" env_logger = "0.6" futures = "0.1.25" diff --git a/protobuf/Cargo.toml b/protobuf/Cargo.toml index 1a401de..b9f69d9 100644 --- a/protobuf/Cargo.toml +++ b/protobuf/Cargo.toml @@ -13,6 +13,6 @@ derive_more = "0.14" prost = "0.4.0" prost-derive = "0.4.0" -actix = "0.8.1" -actix-web = "1.0.0-rc" +actix = "0.8.2" +actix-web = "1.0.0" actix-protobuf = "0.4.0" diff --git a/r2d2/Cargo.toml b/r2d2/Cargo.toml index f57cdf8..bfc5146 100644 --- a/r2d2/Cargo.toml +++ b/r2d2/Cargo.toml @@ -7,7 +7,7 @@ workspace = ".." [dependencies] actix-rt = "0.2" -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" futures = "0.1" env_logger = "0.6" diff --git a/redis-session/Cargo.toml b/redis-session/Cargo.toml index 6e1181a..74943de 100644 --- a/redis-session/Cargo.toml +++ b/redis-session/Cargo.toml @@ -6,8 +6,8 @@ workspace = ".." edition = "2018" [dependencies] -actix = "0.8.1" -actix-web = "1.0.0-beta.4" -actix-session = "0.1.0-beta.4" +actix = "0.8.2" +actix-web = "1.0.0" +actix-session = "0.1.0" actix-redis = { git = "https://github.com/actix/actix-redis.git", features = ["web"] } env_logger = "0.6" diff --git a/rustls/Cargo.toml b/rustls/Cargo.toml index 33d04e5..8e70930 100644 --- a/rustls/Cargo.toml +++ b/rustls/Cargo.toml @@ -12,5 +12,5 @@ path = "src/main.rs" [dependencies] env_logger = "0.5" rustls = "0.15" -actix-web = { version = "1.0.0-beta.4", features=["rust-tls"] } -actix-files = "0.1.0-beta.4" +actix-web = { version = "1.0.0", features=["rust-tls"] } +actix-files = "0.1.0" diff --git a/simple-auth-server/Cargo.toml b/simple-auth-server/Cargo.toml index dab0dc5..fa2396e 100644 --- a/simple-auth-server/Cargo.toml +++ b/simple-auth-server/Cargo.toml @@ -6,10 +6,10 @@ edition = "2018" workspace = ".." [dependencies] -actix = { version = "0.8.1", features = ["http"] } +actix = "0.8.2" actix-rt = "0.2.2" -actix-web = "1.0.0-beta.4" -actix-files = "0.1.0-beta.4" +actix-web = "1.0.0" +actix-files = "0.1.1" bcrypt = "0.2.1" chrono = { version = "0.4.6", features = ["serde"] } diff --git a/state/Cargo.toml b/state/Cargo.toml index 62e83ad..ee4cbf3 100644 --- a/state/Cargo.toml +++ b/state/Cargo.toml @@ -6,6 +6,6 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" futures = "0.1.25" env_logger = "0.6" diff --git a/state/src/main.rs b/state/src/main.rs index a11d5da..3f5d721 100644 --- a/state/src/main.rs +++ b/state/src/main.rs @@ -12,12 +12,12 @@ //! Check [user guide](https://actix.rs/book/actix-web/sec-2-application.html) for more info. use std::io; -use std::sync::{Arc, Mutex}; +use std::sync::Mutex; use actix_web::{middleware, web, App, HttpRequest, HttpResponse, HttpServer}; /// simple handle -fn index(state: web::Data>>, req: HttpRequest) -> HttpResponse { +fn index(state: web::Data>, req: HttpRequest) -> HttpResponse { println!("{:?}", req); *(state.lock().unwrap()) += 1; @@ -28,12 +28,12 @@ fn main() -> io::Result<()> { std::env::set_var("RUST_LOG", "actix_web=info"); env_logger::init(); - let counter = Arc::new(Mutex::new(0usize)); + let counter = web::Data::new(Mutex::new(0usize)); //move is necessary to give closure below ownership of counter HttpServer::new(move || { App::new() - .data(counter.clone()) // <- create app with shared state + .register_data(counter.clone()) // <- create app with shared state // enable logger .wrap(middleware::Logger::default()) // register simple handler, handle all methods diff --git a/static_index/Cargo.toml b/static_index/Cargo.toml index bac404d..7cb6c40 100644 --- a/static_index/Cargo.toml +++ b/static_index/Cargo.toml @@ -9,5 +9,5 @@ edition = "2018" futures = "0.1" env_logger = "0.5" -actix-web = "1.0.0-beta.4" -actix-files = "0.1.0-beta.4" +actix-web = "1.0.0" +actix-files = "0.1.1" diff --git a/template_askama/Cargo.toml b/template_askama/Cargo.toml index 378098c..6d9cb6b 100644 --- a/template_askama/Cargo.toml +++ b/template_askama/Cargo.toml @@ -6,7 +6,7 @@ workspace = ".." edition = "2018" [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" env_logger = "0.6" askama = "0.8" diff --git a/template_tera/Cargo.toml b/template_tera/Cargo.toml index b49959c..cbf2d30 100644 --- a/template_tera/Cargo.toml +++ b/template_tera/Cargo.toml @@ -8,4 +8,4 @@ edition = "2018" [dependencies] env_logger = "0.6" tera = "0.11" -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" diff --git a/template_yarte/Cargo.toml b/template_yarte/Cargo.toml index 0c31b1f..be056ce 100644 --- a/template_yarte/Cargo.toml +++ b/template_yarte/Cargo.toml @@ -12,7 +12,7 @@ env_logger = "0.6" yarte = { version = "0.2", features=["with-actix-web"] } -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" [build-dependencies] yarte = { version = "0.2", features=["with-actix-web"] } @@ -20,4 +20,4 @@ yarte = { version = "0.2", features=["with-actix-web"] } [dev-dependencies] bytes = "0.4" actix-http-test = "0.2.0" -actix-http = "0.2.0" +actix-http = "0.2.3" diff --git a/tls/Cargo.toml b/tls/Cargo.toml index 7541ee4..f68f361 100644 --- a/tls/Cargo.toml +++ b/tls/Cargo.toml @@ -11,6 +11,6 @@ path = "src/main.rs" [dependencies] actix-rt = "0.2" -actix-web = { version="1.0.0-beta.4", features=["ssl"] } +actix-web = { version="1.0.0", features=["ssl"] } env_logger = "0.6" openssl = { version="0.10" } diff --git a/web-cors/backend/Cargo.toml b/web-cors/backend/Cargo.toml index 9ca6702..493132e 100644 --- a/web-cors/backend/Cargo.toml +++ b/web-cors/backend/Cargo.toml @@ -6,7 +6,7 @@ workspace = "../../" edition = "2018" [dependencies] -actix-web = "1.0.0-beta.4" +actix-web = "1.0.0" serde = "1.0" serde_derive = "1.0" serde_json = "1.0" diff --git a/websocket-chat/Cargo.toml b/websocket-chat/Cargo.toml index 73b5866..fb5817f 100644 --- a/websocket-chat/Cargo.toml +++ b/websocket-chat/Cargo.toml @@ -10,10 +10,10 @@ name = "websocket-chat-server" path = "src/main.rs" [dependencies] -actix = "0.8.1" -actix-web = "1.0.0-beta.4" -actix-web-actors = "1.0.0-beta.4" -actix-files = "0.1.0-beta.4" +actix = "0.8.2" +actix-web = "1.0.0" +actix-web-actors = "1.0.0" +actix-files = "0.1.1" rand = "0.6" bytes = "0.4" diff --git a/websocket-tcp-chat/Cargo.toml b/websocket-tcp-chat/Cargo.toml index 8575590..dd100b8 100644 --- a/websocket-tcp-chat/Cargo.toml +++ b/websocket-tcp-chat/Cargo.toml @@ -14,10 +14,10 @@ name = "websocket-tcp-client" path = "src/client.rs" [dependencies] -actix = "0.8.1" -actix-web = "1.0.0-beta.4" -actix-web-actors = "1.0.0-beta.4" -actix-files = "0.1.0-beta.4" +actix = "0.8.2" +actix-web = "1.0.0" +actix-web-actors = "1.0.0" +actix-files = "0.1.1" rand = "0.6" bytes = "0.4" diff --git a/websocket/Cargo.toml b/websocket/Cargo.toml index 89d64a8..7183888 100644 --- a/websocket/Cargo.toml +++ b/websocket/Cargo.toml @@ -14,10 +14,10 @@ path = "src/main.rs" #path = "src/client.rs" [dependencies] -actix = "0.8.1" -actix-web = "1.0.0-beta.4" -actix-web-actors = "1.0.0-beta.4" -actix-files = "0.1.0-beta.4" +actix = "0.8.2" +actix-web = "1.0.0" +actix-web-actors = "1.0.0" +actix-files = "0.1.1" env_logger = "0.6" futures = "0.1" bytes = "0.4" \ No newline at end of file