Update to use latest versions (with tokio 1 support).

This commit is contained in:
LukeMathWalker 2021-02-06 16:15:17 +00:00
parent 7a6a5c90ae
commit a86170188a
3 changed files with 387 additions and 558 deletions

933
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -13,9 +13,11 @@ path = "src/main.rs"
name = "zero2prod" name = "zero2prod"
[dependencies] [dependencies]
actix-web = "3.0.0" actix-web = "=4.0.0-beta.1"
actix-rt = "1.1.1" actix-rt = "=2.0.0-beta.2"
tokio = "0.2.22" actix-service = "=2.0.0-beta.3"
actix-macros = "=0.2.0-beta.1"
tokio = "1"
[dev-dependencies] [dev-dependencies]
reqwest = "0.10.7" reqwest = "0.11"

View file

@ -1,7 +1,7 @@
use std::net::TcpListener; use std::net::TcpListener;
use zero2prod::run; use zero2prod::run;
#[actix_rt::main] #[actix_web::main]
async fn main() -> std::io::Result<()> { async fn main() -> std::io::Result<()> {
let address = TcpListener::bind("127.0.0.1:8000")?; let address = TcpListener::bind("127.0.0.1:8000")?;
run(address)?.await run(address)?.await