Update to latest tokio.

This commit is contained in:
LukeMathWalker 2021-02-11 09:12:55 +00:00
parent 6e0678d459
commit 36cd6d2daa
4 changed files with 282 additions and 618 deletions

View file

@ -38,7 +38,7 @@ jobs:
- name: Migrate database
run: |
sudo apt-get install libpq-dev -y
cargo install --version=0.2.0 sqlx-cli --no-default-features --features postgres
cargo install --version=0.5.1 sqlx-cli --no-default-features --features postgres
SKIP_DOCKER=true ./scripts/init_db.sh
- uses: actions-rs/cargo@v1
with:
@ -81,7 +81,7 @@ jobs:
- name: Migrate database
run: |
sudo apt-get install libpq-dev -y
cargo install --version=0.2.0 sqlx-cli --no-default-features --features postgres
cargo install --version=0.5.1 sqlx-cli --no-default-features --features postgres
SKIP_DOCKER=true ./scripts/init_db.sh
- uses: actions-rs/clippy-check@v1
with:
@ -113,7 +113,7 @@ jobs:
- name: Migrate database
run: |
sudo apt-get install libpq-dev -y
cargo install --version=0.2.0 sqlx-cli --no-default-features --features postgres
cargo install --version=0.5.1 sqlx-cli --no-default-features --features postgres
SKIP_DOCKER=true ./scripts/init_db.sh
- name: Run cargo-tarpaulin
uses: actions-rs/tarpaulin@v0.1

880
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", "offline"] }
sqlx = { version = "0.5.1", default-features = false, features = [ "runtime-actix-rustls", "macros", "postgres", "uuid", "chrono", "migrate", "offline"] }
uuid = { version = "0.8.1", features = ["v4"] }
chrono = "0.4.15"
tracing = "0.1.19"
@ -26,11 +24,13 @@ 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"
serde-aux = "1.0.1"
unicode-segmentation = "1.7.1"
[dev-dependencies]
reqwest = { version = "0.10.7", features = ["json"] }
reqwest = { version = "0.11", features = ["json"] }
lazy_static = "1.4.0"
claim = "0.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);