Update to actix-web 4.0.0-beta.8

This commit is contained in:
LukeMathWalker 2021-07-09 08:37:14 +01:00
parent 01140721c5
commit a522e13ab9
3 changed files with 79 additions and 27 deletions

95
Cargo.lock generated
View file

@ -18,9 +18,9 @@ dependencies = [
[[package]]
name = "actix-http"
version = "3.0.0-beta.5"
version = "3.0.0-beta.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb9c5d7ceb490d6565156ae1d4d467db17da1759425c65a2e36ac5e182e014e2"
checksum = "3cd16d6b846983ffabfd081e1a67abd7698094fcbe7b3d9bcf1acbc6f546a516"
dependencies = [
"actix-codec",
"actix-rt",
@ -33,7 +33,6 @@ dependencies = [
"brotli2",
"bytes",
"bytestring",
"cookie",
"derive_more",
"encoding_rs",
"flate2",
@ -54,19 +53,18 @@ dependencies = [
"rand 0.8.3",
"regex",
"serde",
"serde_json",
"serde_urlencoded",
"sha-1",
"smallvec",
"time 0.2.26",
"tokio",
"zstd",
]
[[package]]
name = "actix-macros"
version = "0.2.0"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbcb2b608f0accc2f5bcf3dd872194ce13d94ee45b571487035864cf966b04ef"
checksum = "c2f86cd6857c135e6e9fe57b1619a88d1f94a7df34c00e11fe13e64fd3438837"
dependencies = [
"quote",
"syn",
@ -115,11 +113,12 @@ dependencies = [
[[package]]
name = "actix-service"
version = "2.0.0-beta.5"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf82340ad9f4e4caf43737fd3bbc999778a268015cdc54675f60af6240bd2b05"
checksum = "77f5f9d66a8730d0fae62c26f3424f5751e5518086628a40b7ab6fca4a705034"
dependencies = [
"futures-core",
"paste",
"pin-project-lite",
]
@ -152,9 +151,9 @@ dependencies = [
[[package]]
name = "actix-web"
version = "4.0.0-beta.5"
version = "4.0.0-beta.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6de19cc341c2e68b1ee126de171e86b610b5bbcecc660d1250ebed73e0257bd6"
checksum = "c503f726f895e55dac39adeafd14b5ee00cc956796314e9227fc7ae2e176f443"
dependencies = [
"actix-codec",
"actix-http",
@ -167,15 +166,19 @@ dependencies = [
"actix-web-codegen",
"ahash 0.7.2",
"bytes",
"cfg-if",
"cookie",
"derive_more",
"either",
"encoding_rs",
"futures-core",
"futures-util",
"itoa",
"language-tags",
"log",
"mime",
"once_cell",
"paste",
"pin-project",
"regex",
"serde",
@ -391,6 +394,9 @@ name = "cc"
version = "1.0.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd"
dependencies = [
"jobserver",
]
[[package]]
name = "cfg-if"
@ -455,9 +461,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
[[package]]
name = "cookie"
version = "0.14.4"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951"
checksum = "ffdf8865bac3d9a3bde5bde9088ca431b11f5d37c7a578b8086af77248b76627"
dependencies = [
"percent-encoding",
"time 0.2.26",
@ -1056,6 +1062,15 @@ version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736"
[[package]]
name = "jobserver"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd"
dependencies = [
"libc",
]
[[package]]
name = "js-sys"
version = "0.3.50"
@ -1067,9 +1082,9 @@ dependencies = [
[[package]]
name = "language-tags"
version = "0.2.2"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388"
[[package]]
name = "lazy_static"
@ -1299,11 +1314,12 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
[[package]]
name = "opentelemetry"
version = "0.13.0"
version = "0.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b91cea1dfd50064e52db033179952d18c770cbc5dfefc8eba45d619357ba3914"
checksum = "492848ff47f11b7f9de0443b404e2c5775f695e1af6b7076ca25f999581d547a"
dependencies = [
"async-trait",
"crossbeam-channel",
"futures",
"js-sys",
"lazy_static",
@ -1344,6 +1360,12 @@ dependencies = [
"winapi",
]
[[package]]
name = "paste"
version = "1.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58"
[[package]]
name = "percent-encoding"
version = "2.1.0"
@ -2232,9 +2254,9 @@ dependencies = [
[[package]]
name = "tracing-actix-web"
version = "0.4.0-beta.4"
version = "0.4.0-beta.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d232c700ac99b41f56aac3832f138009b2dc7538cbdc76fdc6b8304a1ee2d2e0"
checksum = "bbf0bd99dd88c8f08976f20a70720128aae2d5f1bf1f2a28d36d975d73a2ede7"
dependencies = [
"actix-http",
"actix-service",
@ -2307,9 +2329,9 @@ dependencies = [
[[package]]
name = "tracing-opentelemetry"
version = "0.12.0"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99003208b647dae59dcefc49c98aecaa3512fbc29351685d4b9ef23a9218458e"
checksum = "e2f4cb277b92a8ba1170b3b911056428ce2ef9993351baf5965bb0359a2e5963"
dependencies = [
"opentelemetry",
"tracing",
@ -2668,8 +2690,8 @@ version = "0.1.0"
dependencies = [
"actix-http",
"actix-rt",
"actix-service",
"actix-web",
"anyhow",
"chrono",
"claim",
"config",
@ -2697,3 +2719,32 @@ dependencies = [
"validator",
"wiremock",
]
[[package]]
name = "zstd"
version = "0.7.0+zstd.1.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9428752481d8372e15b1bf779ea518a179ad6c771cca2d2c60e4fbff3cc2cd52"
dependencies = [
"zstd-safe",
]
[[package]]
name = "zstd-safe"
version = "3.1.0+zstd.1.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5aa1926623ad7fe406e090555387daf73db555b948134b4d73eac5eb08fb666d"
dependencies = [
"libc",
"zstd-sys",
]
[[package]]
name = "zstd-sys"
version = "1.5.0+zstd.1.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4e6c094340240369025fc6b731b054ee2a834328fa584310ac96aa4baebdc465"
dependencies = [
"cc",
"libc",
]

View file

@ -13,9 +13,8 @@ path = "src/main.rs"
name = "zero2prod"
[dependencies]
actix-http = "=3.0.0-beta.5"
actix-service = "=2.0.0-beta.5"
actix-web = "=4.0.0-beta.5"
actix-http = "=3.0.0-beta.8"
actix-web = "=4.0.0-beta.8"
serde = "1.0.115"
config = { version = "0.10.1", default-features = false, features = ["yaml"] }
@ -33,7 +32,8 @@ unicode-segmentation = "1.7.1"
validator = "0.12.0"
rand = { version = "0.8", features=["std_rng"] }
sha2 = { version = "0.9" }
tracing-actix-web = "0.4.0-beta.4"
tracing-actix-web = "0.4.0-beta.8"
anyhow = "1.0.40"
[dev-dependencies]
once_cell = "1.7.2"

View file

@ -72,6 +72,7 @@ fn run(
) -> Result<Server, std::io::Error> {
let db_pool = Data::new(db_pool);
let email_client = Data::new(email_client);
let base_url = Data::new(ApplicationBaseUrl(base_url));
let server = HttpServer::new(move || {
App::new()
.wrap(TracingLogger::default())
@ -80,7 +81,7 @@ fn run(
.route("/subscriptions/confirm", web::get().to(confirm))
.app_data(db_pool.clone())
.app_data(email_client.clone())
.data(ApplicationBaseUrl(base_url.clone()))
.app_data(base_url.clone())
})
.listen(listener)?
.run();