1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-01-18 22:01:50 +01:00

update migration

This commit is contained in:
Nikolay Kim 2019-12-22 17:16:07 +04:00
parent 6a0cd2dced
commit 1c75e6876b
3 changed files with 6 additions and 6 deletions

View File

@ -67,11 +67,11 @@ actix-rt = "1.0.0"
actix-server = "1.0.0" actix-server = "1.0.0"
actix-testing = "1.0.0" actix-testing = "1.0.0"
actix-macros = "0.1.0" actix-macros = "0.1.0"
actix-threadpool = "0.3.0" actix-threadpool = "0.3.1"
actix-tls = "1.0.0" actix-tls = "1.0.0"
actix-web-codegen = "0.2.0" actix-web-codegen = "0.2.0"
actix-http = "1.0.0" actix-http = "1.0.1"
awc = { version = "1.0.1", default-features = false } awc = { version = "1.0.1", default-features = false }
bytes = "0.5.3" bytes = "0.5.3"
@ -93,7 +93,7 @@ open-ssl = { version="0.10", package = "openssl", optional = true }
rust-tls = { version = "0.16.0", package = "rustls", optional = true } rust-tls = { version = "0.16.0", package = "rustls", optional = true }
[dev-dependencies] [dev-dependencies]
actix = "0.9.0-alpha.2" actix = "0.9.0"
rand = "0.7" rand = "0.7"
env_logger = "0.6" env_logger = "0.6"
serde_derive = "1.0" serde_derive = "1.0"

View File

@ -9,10 +9,10 @@
* Extractor configuration must be registered with `App::app_data()` instead of `App::data()` * Extractor configuration must be registered with `App::app_data()` instead of `App::data()`
* Sync handlers has been removed. `.to_async()` method has been renamed to `.to()` * Sync handlers has been removed. `.to_async()` method has been renamed to `.to()`
replace `fn` with `async fn` to convert sync handler to async replace `fn` with `async fn` to convert sync handler to async
* `TestServer::new()` renamed to `TestServer::start()` * `actix_http_test::TestServer` moved to `actix_web::test` module. To start
test server use `test::start()` or `test_start_with_config()` methods
## 1.0.1 ## 1.0.1

View File

@ -53,7 +53,7 @@ async fn index(info: web::Path<(u32, String)>) -> impl Responder {
async fn main() -> std::io::Result<()> { async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().service(index)) HttpServer::new(|| App::new().service(index))
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }
``` ```