Update to tokio 1

This commit is contained in:
LukeMathWalker 2021-02-11 08:59:55 +00:00
parent d81dcb2e40
commit ef960053b3
3 changed files with 456 additions and 818 deletions

1260
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -13,12 +13,10 @@ path = "src/main.rs"
name = "zero2prod"
[dependencies]
actix-web = "3.0.0"
actix-rt = "1.1.1"
tokio = "0.2.22"
actix-web = "4.0.0-beta.3"
serde = "1.0.115"
config = { version = "0.10.1", default-features = false, features = ["yaml"] }
sqlx = { version = "0.4.1", default-features = false, features = [ "runtime-actix-rustls", "macros", "postgres", "uuid", "chrono", "migrate"] }
sqlx = { version = "0.5.1", default-features = false, features = [ "runtime-actix-rustls", "macros", "postgres", "uuid", "chrono", "migrate"] }
uuid = { version = "0.8.1", features = ["v4"] }
chrono = "0.4.15"
tracing = "0.1.19"
@ -26,8 +24,10 @@ tracing-futures = "0.2.4"
tracing-subscriber = { version = "0.2.12", features = ["registry", "env-filter"] }
tracing-bunyan-formatter = "0.1.6"
tracing-log = "0.1.1"
tracing-actix-web = "0.2.0"
tracing-actix-web = "0.3.0-beta.2"
[dev-dependencies]
reqwest = { version = "0.10.7", features = ["json"] }
reqwest = { version = "0.11", features = ["json"] }
lazy_static = "1.4.0"
actix-rt = "2"
tokio = "1"

View file

@ -4,7 +4,7 @@ use zero2prod::configuration::get_configuration;
use zero2prod::startup::run;
use zero2prod::telemetry::{get_subscriber, init_subscriber};
#[actix_rt::main]
#[actix_web::main]
async fn main() -> std::io::Result<()> {
let subscriber = get_subscriber("zero2prod".into(), "info".into());
init_subscriber(subscriber);