1
0
mirror of https://github.com/actix/examples synced 2024-11-27 16:02:57 +01:00

update actix web to stable version

This commit is contained in:
Rob Ede 2022-02-25 21:07:22 +00:00
parent c3a74c6823
commit 4dc9199781
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
61 changed files with 144 additions and 150 deletions

122
Cargo.lock generated
View File

@ -126,9 +126,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-files" name = "actix-files"
version = "0.6.0-beta.16" version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b49f1b48724a52605ba40b67ede24f5a6cbc246817f9278d280d393a28e8b0e" checksum = "d81bde9a79336aa51ebed236e91fc1a0528ff67cfdf4f68ca4c61ede9fd26fb5"
dependencies = [ dependencies = [
"actix-http", "actix-http",
"actix-service", "actix-service",
@ -149,9 +149,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-http" name = "actix-http"
version = "3.0.0-rc.3" version = "3.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8b5ba038f3bb4aa29ad9bdd7eba09955ff04503263c497fc61a389d6412f4e8" checksum = "0f3fdd63b9cfeaf92eeeece719dabbddddb420a57d3fd171ce1490ecfb7086b1"
dependencies = [ dependencies = [
"actix-codec 0.5.0", "actix-codec 0.5.0",
"actix-rt", "actix-rt",
@ -213,9 +213,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-identity" name = "actix-identity"
version = "0.4.0-beta.8" version = "0.4.0-beta.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f084963856cf7990b1f21d6298626de4ae6178385cadece312e12c9f7a9f432" checksum = "68895242adbce3e672e60c8fdcd1895491afcbbc8f5b7a7fca14932307ccdde4"
dependencies = [ dependencies = [
"actix-service", "actix-service",
"actix-utils", "actix-utils",
@ -238,9 +238,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-multipart" name = "actix-multipart"
version = "0.4.0-beta.13" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c59b1f14a8b2bc14df9be544d173f5390da5b62d531e406fd0f0ce9b825fea5a" checksum = "c9edfb0e7663d7fe18c8d5b668c9c1bcf79176b1dcc9d4da9592503209a6bfb0"
dependencies = [ dependencies = [
"actix-utils", "actix-utils",
"actix-web", "actix-web",
@ -294,9 +294,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-router" name = "actix-router"
version = "0.5.0-rc.3" version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb6506dbef336634ff35d994d58daa0a412ea23751f15f9b4dcac4d594b1ed1f" checksum = "eb60846b52c118f2f04a56cc90880a274271c489b2498623d58176f8ca21fa80"
dependencies = [ dependencies = [
"bytestring", "bytestring",
"firestorm", "firestorm",
@ -419,11 +419,11 @@ dependencies = [
[[package]] [[package]]
name = "actix-web" name = "actix-web"
version = "4.0.0-rc.3" version = "4.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83e3c85bc4116b69913b03f16cff8cade1212508fcd321847d9cfe3d3e41f991" checksum = "f4e5ebffd51d50df56a3ae0de0e59487340ca456f05dd0b90c0a7a6dd6a74d31"
dependencies = [ dependencies = [
"actix-codec 0.4.2", "actix-codec 0.5.0",
"actix-http", "actix-http",
"actix-macros", "actix-macros",
"actix-router", "actix-router",
@ -435,6 +435,7 @@ dependencies = [
"actix-web-codegen", "actix-web-codegen",
"ahash", "ahash",
"bytes 1.1.0", "bytes 1.1.0",
"bytestring",
"cfg-if 1.0.0", "cfg-if 1.0.0",
"cookie 0.16.0", "cookie 0.16.0",
"derive_more", "derive_more",
@ -459,9 +460,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-web-actors" name = "actix-web-actors"
version = "4.0.0-beta.12" version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95319210d3670dcdc918e670c076bd77f0b8ee557d84c157d8c408796bcd5eb9" checksum = "f1afe39026e519503c1a3a4a9ebd22c9b4b6930e85842c6d1c8958aea7a87ed1"
dependencies = [ dependencies = [
"actix", "actix",
"actix-codec 0.5.0", "actix-codec 0.5.0",
@ -476,9 +477,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-web-codegen" name = "actix-web-codegen"
version = "0.5.0-rc.2" version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d0976042e6ddc82c7d0dedd64d39959bc26d9bba098b2f6c32a73fbef784eaf" checksum = "7525bedf54704abb1d469e88d7e7e9226df73778798a69cea5022d53b2ae91bc"
dependencies = [ dependencies = [
"actix-router", "actix-router",
"proc-macro2", "proc-macro2",
@ -608,7 +609,7 @@ version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
dependencies = [ dependencies = [
"getrandom 0.2.4", "getrandom 0.2.5",
"once_cell", "once_cell",
"version_check", "version_check",
] ]
@ -649,9 +650,9 @@ dependencies = [
[[package]] [[package]]
name = "anyhow" name = "anyhow"
version = "1.0.53" version = "1.0.55"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" checksum = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd"
[[package]] [[package]]
name = "arrayref" name = "arrayref"
@ -978,10 +979,11 @@ dependencies = [
"itoa 1.0.1", "itoa 1.0.1",
"log", "log",
"mime", "mime",
"openssl",
"percent-encoding", "percent-encoding",
"pin-project-lite 0.2.8", "pin-project-lite 0.2.8",
"rand 0.8.5", "rand 0.8.5",
"rustls 0.20.3", "rustls 0.20.4",
"serde 1.0.136", "serde 1.0.136",
"serde_json", "serde_json",
"serde_urlencoded", "serde_urlencoded",
@ -997,7 +999,7 @@ dependencies = [
"env_logger", "env_logger",
"log", "log",
"mime", "mime",
"rustls 0.20.3", "rustls 0.20.4",
"webpki-roots 0.22.2", "webpki-roots 0.22.2",
] ]
@ -1357,9 +1359,9 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "3.1.0" version = "3.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5f1fea81f183005ced9e59cdb01737ef2423956dac5a6d731b06b2ecfaa3467" checksum = "5177fac1ab67102d8989464efd043c6ff44191b1557ec1ddd489b4f7e1447e77"
dependencies = [ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
@ -1374,9 +1376,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_derive" name = "clap_derive"
version = "3.1.0" version = "3.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5fd1122e63869df2cb309f449da1ad54a7c6dfeb7c7e6ccd8e0825d9eb93bb72" checksum = "01d42c94ce7c2252681b5fed4d3627cc807b13dfc033246bd05d5b252399000e"
dependencies = [ dependencies = [
"heck 0.4.0", "heck 0.4.0",
"proc-macro-error", "proc-macro-error",
@ -2249,9 +2251,9 @@ dependencies = [
[[package]] [[package]]
name = "getrandom" name = "getrandom"
version = "0.2.4" version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77"
dependencies = [ dependencies = [
"cfg-if 1.0.0", "cfg-if 1.0.0",
"libc", "libc",
@ -2958,9 +2960,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.118" version = "0.2.119"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06e509672465a0504304aa87f9f176f2b2b716ed8fb105ebe5c02dc6dce96a94" checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"
[[package]] [[package]]
name = "libsqlite3-sys" name = "libsqlite3-sys"
@ -3140,7 +3142,7 @@ dependencies = [
"env_logger", "env_logger",
"futures-util", "futures-util",
"log", "log",
"rustls 0.20.3", "rustls 0.20.4",
"rustls-pemfile", "rustls-pemfile",
] ]
@ -3967,9 +3969,9 @@ dependencies = [
[[package]] [[package]]
name = "proc-macro-crate" name = "proc-macro-crate"
version = "1.1.2" version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dada8c9981fcf32929c3c0f0cd796a9284aca335565227ed88c83babb1d43dc" checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a"
dependencies = [ dependencies = [
"thiserror", "thiserror",
"toml", "toml",
@ -4181,7 +4183,7 @@ version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
dependencies = [ dependencies = [
"getrandom 0.2.4", "getrandom 0.2.5",
] ]
[[package]] [[package]]
@ -4279,7 +4281,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
dependencies = [ dependencies = [
"getrandom 0.2.4", "getrandom 0.2.5",
"redox_syscall", "redox_syscall",
] ]
@ -4574,9 +4576,9 @@ checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2"
[[package]] [[package]]
name = "rust_decimal" name = "rust_decimal"
version = "1.21.0" version = "1.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4214023b1223d02a4aad9f0bb9828317634a56530870a2eaf7200a99c0c10f68" checksum = "d37baa70cf8662d2ba1c1868c5983dda16ef32b105cce41fb5c47e72936a90b3"
dependencies = [ dependencies = [
"arrayvec 0.7.2", "arrayvec 0.7.2",
"num-traits 0.2.14", "num-traits 0.2.14",
@ -4604,7 +4606,7 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
dependencies = [ dependencies = [
"semver 1.0.5", "semver 1.0.6",
] ]
[[package]] [[package]]
@ -4622,9 +4624,9 @@ dependencies = [
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.20.3" version = "0.20.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b323592e3164322f5b193dc4302e4e36cd8d37158a712d664efae1a5c2791700" checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921"
dependencies = [ dependencies = [
"log", "log",
"ring", "ring",
@ -4640,7 +4642,7 @@ dependencies = [
"actix-web", "actix-web",
"env_logger", "env_logger",
"log", "log",
"rustls 0.20.3", "rustls 0.20.4",
"rustls-pemfile", "rustls-pemfile",
] ]
@ -4651,7 +4653,7 @@ dependencies = [
"actix-files", "actix-files",
"actix-web", "actix-web",
"env_logger", "env_logger",
"rustls 0.20.3", "rustls 0.20.4",
"rustls-pemfile", "rustls-pemfile",
] ]
@ -4811,9 +4813,9 @@ dependencies = [
[[package]] [[package]]
name = "semver" name = "semver"
version = "1.0.5" version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0486718e92ec9a68fbed73bb5ef687d71103b142595b406835649bebd33f72c7" checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d"
[[package]] [[package]]
name = "semver-parser" name = "semver-parser"
@ -5091,9 +5093,9 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83"
[[package]] [[package]]
name = "smartstring" name = "smartstring"
version = "0.2.9" version = "0.2.10"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31aa6a31c0c2b21327ce875f7e8952322acfcfd0c27569a6e18a647281352c9b" checksum = "e714dff2b33f2321fdcd475b71cec79781a692d846f37f415fb395a1d2bcd48e"
dependencies = [ dependencies = [
"static_assertions 1.1.0", "static_assertions 1.1.0",
] ]
@ -5160,9 +5162,9 @@ dependencies = [
[[package]] [[package]]
name = "sqlx" name = "sqlx"
version = "0.5.10" version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "692749de69603d81e016212199d73a2e14ee20e2def7d7914919e8db5d4d48b9" checksum = "fc15591eb44ffb5816a4a70a7efd5dd87bfd3aa84c4c200401c4396140525826"
dependencies = [ dependencies = [
"sqlx-core", "sqlx-core",
"sqlx-macros", "sqlx-macros",
@ -5170,9 +5172,9 @@ dependencies = [
[[package]] [[package]]
name = "sqlx-core" name = "sqlx-core"
version = "0.5.10" version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "518be6f6fff5ca76f985d434f9c37f3662af279642acf730388f271dff7b9016" checksum = "195183bf6ff8328bb82c0511a83faf60aacf75840103388851db61d7a9854ae3"
dependencies = [ dependencies = [
"ahash", "ahash",
"atoi", "atoi",
@ -5180,9 +5182,7 @@ dependencies = [
"byteorder", "byteorder",
"bytes 1.1.0", "bytes 1.1.0",
"crc", "crc",
"crossbeam-channel",
"crossbeam-queue", "crossbeam-queue",
"crossbeam-utils",
"either", "either",
"flume", "flume",
"futures-channel", "futures-channel",
@ -5199,7 +5199,7 @@ dependencies = [
"log", "log",
"memchr", "memchr",
"once_cell", "once_cell",
"parking_lot 0.11.2", "paste",
"percent-encoding", "percent-encoding",
"rustls 0.19.1", "rustls 0.19.1",
"serde 1.0.136", "serde 1.0.136",
@ -5217,9 +5217,9 @@ dependencies = [
[[package]] [[package]]
name = "sqlx-macros" name = "sqlx-macros"
version = "0.5.10" version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38e45140529cf1f90a5e1c2e561500ca345821a1c513652c8f486bbf07407cc8" checksum = "eee35713129561f5e55c554bba1c378e2a7e67f81257b7311183de98c50e6f94"
dependencies = [ dependencies = [
"dotenv", "dotenv",
"either", "either",
@ -5239,9 +5239,9 @@ dependencies = [
[[package]] [[package]]
name = "sqlx-rt" name = "sqlx-rt"
version = "0.5.10" version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8061cbaa91ee75041514f67a09398c65a64efed72c90151ecd47593bad53da99" checksum = "b555e70fbbf84e269ec3858b7a6515bcfe7a166a7cc9c636dd6efd20431678b6"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"tokio 1.17.0", "tokio 1.17.0",
@ -5808,7 +5808,7 @@ version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b"
dependencies = [ dependencies = [
"rustls 0.20.3", "rustls 0.20.4",
"tokio 1.17.0", "tokio 1.17.0",
"webpki 0.22.0", "webpki 0.22.0",
] ]
@ -6206,7 +6206,7 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
dependencies = [ dependencies = [
"getrandom 0.2.4", "getrandom 0.2.5",
"serde 1.0.136", "serde 1.0.136",
] ]
@ -6803,9 +6803,9 @@ dependencies = [
[[package]] [[package]]
name = "zeroize" name = "zeroize"
version = "1.5.2" version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7c88870063c39ee00ec285a2f8d6a966e5b6fb2becc4e8dac77ed0d370ed6006" checksum = "50344758e2f40e3a1fcfc8f6f91aa57b5f8ebd8d27919fe6451f15aaaf9ee608"
[[package]] [[package]]
name = "zstd" name = "zstd"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
casbin = "2.0.9" casbin = "2.0.9"
loge = {version = "0.4", default-features = false, features = ["colored", "chrono"]} loge = {version = "0.4", default-features = false, features = ["colored", "chrono"]}
tokio = { version = "1.16.1", features = ["sync"] } tokio = { version = "1.16.1", features = ["sync"] }

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
actix-identity = "0.4.0-beta.8" actix-identity = "0.4.0-beta.8"
env_logger = "0.9.0" env_logger = "0.9.0"
rand = "0.8.4" rand = "0.8.4"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
actix-session = "0.5.0-beta.7" actix-session = "0.5.0-beta.7"
log = "0.4" log = "0.4"
env_logger = "0.9.0" env_logger = "0.9.0"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
actix-session = "0.5.0-beta.7" actix-session = "0.5.0-beta.7"
actix-redis = "0.10.0-beta.5" actix-redis = "0.10.0-beta.5"
env_logger = "0.9.0" env_logger = "0.9.0"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
actix-identity = "0.4.0-beta.8" actix-identity = "0.4.0-beta.8"
chrono = { version = "0.4.6", features = ["serde"] } chrono = { version = "0.4.6", features = ["serde"] }

View File

@ -4,8 +4,8 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
actix-files = "0.6.0-beta.15" actix-files = "0.6"
actix-session = "0.5.0-beta.7" actix-session = "0.5.0-beta.7"
async-stream = "0.3" async-stream = "0.3"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
derive_more = "0.99.2" derive_more = "0.99.2"
rand = "0.8" rand = "0.8"
env_logger = "0.9" env_logger = "0.9"

View File

@ -4,5 +4,5 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
env_logger = "0.9.0" env_logger = "0.9.0"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = { version = "4.0.0-beta.21", features = ["openssl"] } actix-web = { version = "4", features = ["openssl"] }
env_logger = "0.9" env_logger = "0.9"
serde = { version = "^1.0", features = ["derive"] } serde = { version = "^1.0", features = ["derive"] }
serde_json = "1.0.39" serde_json = "1.0.39"

View File

@ -4,5 +4,5 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
env_logger = "0.9.0" env_logger = "0.9.0"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-files = "0.6.0-beta.15" actix-files = "0.6"
env_logger = "0.9.0" env_logger = "0.9.0"
log = "0.4" log = "0.4"

View File

@ -4,8 +4,8 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-files = "0.6.0-beta.16" actix-files = "0.6"
actix-session = "0.5.0-beta.7" actix-session = "0.5.0-beta.7"
dotenv = "0.15" dotenv = "0.15"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = { version = "4.0.0-beta.21", features = ["rustls"] } actix-web = { version = "4", features = ["rustls"] }
actix-cors = "0.6.0-beta.8" actix-cors = "0.6.0-beta.8"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
num_cpus = "1.13" num_cpus = "1.13"
redis = { version = "0.19.0", default-features = false, features = ["tokio-comp"] } redis = { version = "0.19.0", default-features = false, features = ["tokio-comp"] }
# redis_tang is an redis pool for test purpose # redis_tang is an redis pool for test purpose

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
diesel = { version = "1.4.8", features = ["sqlite", "r2d2"] } diesel = { version = "1.4.8", features = ["sqlite", "r2d2"] }
dotenv = "0.15" dotenv = "0.15"
env_logger = "0.9.0" env_logger = "0.9.0"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
futures-util = "0.3.17" futures-util = "0.3.17"
mongodb = "2.0.0" mongodb = "2.0.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
config = "0.11.0" config = "0.11.0"
deadpool-postgres = { version = "0.10.1", features = ["serde"] } deadpool-postgres = { version = "0.10.1", features = ["serde"] }
derive_more = "0.99.2" derive_more = "0.99.2"

View File

@ -5,7 +5,7 @@ edition = "2021"
[dependencies] [dependencies]
actix = "0.12" actix = "0.12"
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-redis = "0.10.0-beta.6" actix-redis = "0.10.0-beta.6"
futures-util = { version = "0.3.7", default-features = false, features = ["std"] } futures-util = { version = "0.3.7", default-features = false, features = ["std"] }
log = "0.4" log = "0.4"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
env_logger = "0.9" env_logger = "0.9"
futures-util = { version = "0.3", default-features = false, features = ["std"] } futures-util = { version = "0.3", default-features = false, features = ["std"] }

View File

@ -4,6 +4,6 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
env_logger = "0.9" env_logger = "0.9"
log = "0.4" log = "0.4"

View File

@ -4,5 +4,5 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-multipart = "0.4.0-beta.12" actix-multipart = "0.4.0-beta.12"
dotenv = "0.15.0" dotenv = "0.15.0"

View File

@ -10,7 +10,7 @@ readme = "README.md"
[dependencies] [dependencies]
actix-multipart = "0.4.0-beta.12" actix-multipart = "0.4.0-beta.12"
actix-web = "4.0.0-rc.3" actix-web = "4"
futures-util = "0.3" futures-util = "0.3"
sanitize-filename = "0.3" sanitize-filename = "0.3"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-web-lab = "0.10" actix-web-lab = "0.10"
actix-cors = "0.6.0-beta.10" actix-cors = "0.6.0-beta.10"

View File

@ -121,12 +121,8 @@ impl QueryRoot {
first: Option<i32>, first: Option<i32>,
last: Option<i32>, last: Option<i32>,
) -> FieldResult<Connection<usize, Human, EmptyFields, EmptyFields>> { ) -> FieldResult<Connection<usize, Human, EmptyFields, EmptyFields>> {
let humans = ctx let humans = ctx.data_unchecked::<StarWars>().humans().to_vec();
.data_unchecked::<StarWars>()
.humans()
.iter()
.copied()
.collect::<Vec<_>>();
query_characters(after, before, first, last, &humans) query_characters(after, before, first, last, &humans)
.await .await
.map(|conn| conn.map_node(Human)) .map(|conn| conn.map_node(Human))
@ -148,12 +144,8 @@ impl QueryRoot {
first: Option<i32>, first: Option<i32>,
last: Option<i32>, last: Option<i32>,
) -> FieldResult<Connection<usize, Droid, EmptyFields, EmptyFields>> { ) -> FieldResult<Connection<usize, Droid, EmptyFields, EmptyFields>> {
let droids = ctx let droids = ctx.data_unchecked::<StarWars>().droids().to_vec();
.data_unchecked::<StarWars>()
.droids()
.iter()
.copied()
.collect::<Vec<_>>();
query_characters(after, before, first, last, &droids) query_characters(after, before, first, last, &droids)
.await .await
.map(|conn| conn.map_node(Droid)) .map(|conn| conn.map_node(Droid))

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-web-lab = "0.10" actix-web-lab = "0.10"
actix-cors = "0.6.0-beta.10" actix-cors = "0.6.0-beta.10"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-web-lab = "0.10" actix-web-lab = "0.10"
actix-cors = "0.6.0-beta.10" actix-cors = "0.6.0-beta.10"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = { version = "4.0.0-rc.3", features = ["openssl"] } actix-web = { version = "4", features = ["openssl"] }
awc = "3.0.0-beta.19" awc = "3.0.0-beta.19"
clap = { version = "3", features = ["derive"] } clap = { version = "3", features = ["derive"] }

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
awc = { version = "3.0.0-beta.19", features = ["rustls"] } awc = { version = "3.0.0-beta.19", features = ["rustls"] }
env_logger = "0.9" env_logger = "0.9"

View File

@ -4,8 +4,8 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = { version = "4.0.0-rc.3", features = ["openssl"] } actix-web = { version = "4", features = ["openssl"] }
actix-files = "0.6.0-beta.16" actix-files = "0.6"
acme-micro = "0.12" acme-micro = "0.12"
anyhow = "1" anyhow = "1"

View File

@ -4,6 +4,6 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = { version = "4.0.0-beta.21", features = ["openssl"] } actix-web = { version = "4", features = ["openssl"] }
env_logger = "0.9" env_logger = "0.9"
openssl = "0.10" openssl = "0.10"

View File

@ -5,7 +5,7 @@ edition = "2021"
[dependencies] [dependencies]
actix-tls = "3.0" actix-tls = "3.0"
actix-web = { version = "4.0.0-rc.3", features = ["rustls"] } actix-web = { version = "4", features = ["rustls"] }
env_logger = "0.9" env_logger = "0.9"
log = "0.4" log = "0.4"
rustls = "0.20.2" rustls = "0.20.2"

View File

@ -11,5 +11,5 @@ path = "src/main.rs"
env_logger = "0.9" env_logger = "0.9"
rustls = "0.20.2" rustls = "0.20.2"
rustls-pemfile = "0.2.1" rustls-pemfile = "0.2.1"
actix-web = { version = "4.0.0-beta.21", features = ["rustls"] } actix-web = { version = "4", features = ["rustls"] }
actix-files = "0.6.0-beta.15" actix-files = "0.6"

View File

@ -4,5 +4,5 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
serde = "1" serde = "1"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
failure = "0.1" failure = "0.1"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"

View File

@ -1,9 +1,11 @@
// This example is meant to show how to automatically generate a json error response when something goes wrong. //! This example is meant to show how to automatically generate a json error response when something goes wrong.
use std::fmt::{Display, Formatter, Result as FmtResult};
use std::io;
use actix_web::http::StatusCode; use std::{
use actix_web::{web, App, HttpServer, ResponseError}; fmt::{Display, Formatter, Result as FmtResult},
io,
};
use actix_web::{http::StatusCode, web, App, HttpResponse, HttpServer, ResponseError};
use serde::Serialize; use serde::Serialize;
use serde_json::{json, to_string_pretty}; use serde_json::{json, to_string_pretty};
@ -21,13 +23,13 @@ impl Display for Error {
impl ResponseError for Error { impl ResponseError for Error {
// builds the actual response to send back when an error occurs // builds the actual response to send back when an error occurs
fn error_response(&self) -> web::HttpResponse { fn error_response(&self) -> HttpResponse {
let err_json = json!({ "error": self.msg }); let err_json = json!({ "error": self.msg });
web::HttpResponse::build(StatusCode::from_u16(self.status).unwrap()).json(err_json) HttpResponse::build(StatusCode::from_u16(self.status).unwrap()).json(err_json)
} }
} }
async fn index() -> Result<web::HttpResponse, Error> { async fn index() -> Result<HttpResponse, Error> {
Err(Error { Err(Error {
msg: "an example error message".to_string(), msg: "an example error message".to_string(),
status: 400, status: 400,

View File

@ -4,8 +4,8 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = { version = "4.0.0-beta.21", features = ["openssl"] } actix-web = "4"
awc = "3.0.0-beta.19" awc = { version = "3.0.0-beta.19", features = ["openssl"] }
env_logger = "0.9" env_logger = "0.9"
futures = "0.3.1" futures = "0.3.1"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
futures = "0.3" futures = "0.3"
env_logger = "0.9.0" env_logger = "0.9.0"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
bytes = "1.1.0" bytes = "1.1.0"
env_logger = "0.9.0" env_logger = "0.9.0"

View File

@ -4,6 +4,6 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
log = "0.4" log = "0.4"
env_logger = "0.9" env_logger = "0.9"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = { version = "4.0.0-beta.21", features = ["rustls"] } actix-web = { version = "4", features = ["rustls"] }
env_logger = "0.9" env_logger = "0.9"
futures-util = { version = "0.3.7", default-features = false, features = ["std"] } futures-util = { version = "0.3.7", default-features = false, features = ["std"] }
log = "0.4" log = "0.4"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
env_logger = "0.9" env_logger = "0.9"
futures-util = { version = "0.3.7", default-features = false, features = ["std"] } futures-util = { version = "0.3.7", default-features = false, features = ["std"] }
log = "0.4" log = "0.4"

View File

@ -6,7 +6,7 @@ edition = "2021"
[dependencies] [dependencies]
actix = "0.12" actix = "0.12"
actix-protobuf = "0.7.0-beta.5" actix-protobuf = "0.7.0-beta.5"
actix-web = "4.0.0-rc.3" actix-web = "4"
env_logger = "0.9" env_logger = "0.9"
log = "0.4" log = "0.4"
prost = "0.9" prost = "0.9"

View File

@ -5,7 +5,7 @@ edition = "2021"
description = "Run Actix Web in separate thread" description = "Run Actix Web in separate thread"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
env_logger = "0.9" env_logger = "0.9"
log = "0.4" log = "0.4"

View File

@ -4,7 +4,7 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
env_logger = "0.9" env_logger = "0.9"
futures-util = { version = "0.3.7", default-features = false, features = ["std"] } futures-util = { version = "0.3.7", default-features = false, features = ["std"] }
log = "0.4" log = "0.4"

View File

@ -5,7 +5,7 @@ edition = "2021"
description = "Send a request to the server to shut it down" description = "Send a request to the server to shut it down"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
env_logger = "0.9" env_logger = "0.9"
futures = "0.3" futures = "0.3"
tokio = { version = "1.16", features = ["signal"] } tokio = { version = "1.16", features = ["signal"] }

View File

@ -5,7 +5,7 @@ edition = "2021"
[dependencies] [dependencies]
env_logger = "0.9.0" env_logger = "0.9.0"
actix-web = "4.0.0-beta.21" actix-web = "4"
askama = "0.11.0" askama = "0.11.0"
[build-dependencies] [build-dependencies]

View File

@ -4,6 +4,6 @@ version = "1.0.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-beta.21" actix-web = "4"
handlebars = { version = "4.2.1", features = ["dir_source"] } handlebars = { version = "4.2.1", features = ["dir_source"] }
serde_json = "1.0" serde_json = "1.0"

View File

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-web-lab = "0.10" actix-web-lab = "0.10"
env_logger = "0.9" env_logger = "0.9"
log = "0.4" log = "0.4"

View File

@ -6,4 +6,4 @@ edition = "2021"
[dependencies] [dependencies]
env_logger = "0.9.0" env_logger = "0.9.0"
tera = "1.8.0" tera = "1.8.0"
actix-web = "4.0.0-beta.21" actix-web = "4"

View File

@ -15,8 +15,8 @@ async fn index(
let s = if let Some(name) = query.get("name") { let s = if let Some(name) = query.get("name") {
// submitted form // submitted form
let mut ctx = tera::Context::new(); let mut ctx = tera::Context::new();
ctx.insert("name", &name.to_owned()); ctx.insert("name", name);
ctx.insert("text", &"Welcome!".to_owned()); ctx.insert("text", "Welcome!");
tmpl.render("user.html", &ctx) tmpl.render("user.html", &ctx)
.map_err(|_| error::ErrorInternalServerError("Template error"))? .map_err(|_| error::ErrorInternalServerError("Template error"))?
} else { } else {

View File

@ -6,5 +6,5 @@ edition = "2021"
[dependencies] [dependencies]
env_logger = "0.9.0" env_logger = "0.9.0"
tinytemplate = "1.1" tinytemplate = "1.1"
actix-web = "4.0.0-beta.21" actix-web = "4"
serde_json = "1" serde_json = "1"

View File

@ -5,7 +5,7 @@ publish = false
edition = "2021" edition = "2021"
[dependencies] [dependencies]
actix-web = "4.0.0-rc.3" actix-web = "4"
env_logger = "0.9.0" env_logger = "0.9.0"
yarte = { version = "0.15", features = ["bytes-buf", "html-min"] } yarte = { version = "0.15", features = ["bytes-buf", "html-min"] }
derive_more = "0.99" derive_more = "0.99"

View File

@ -5,4 +5,4 @@ edition = "2021"
[dependencies] [dependencies]
env_logger = "0.9.0" env_logger = "0.9.0"
actix-web = "4.0.0-rc.3" actix-web = "4"

View File

@ -9,7 +9,7 @@ path = "src/main.rs"
[dependencies] [dependencies]
actix = "0.12" actix = "0.12"
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-web-actors = "4.0.0-beta.12" actix-web-actors = "4.0.0-beta.12"
env_logger = "0.9" env_logger = "0.9"

View File

@ -10,8 +10,8 @@ path = "src/main.rs"
[dependencies] [dependencies]
actix = "0.12" actix = "0.12"
actix-broker = "0.4" actix-broker = "0.4"
actix-files = "0.6.0-beta.16" actix-files = "0.6"
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-web-actors = "4.0.0-beta.12" actix-web-actors = "4.0.0-beta.12"
env_logger = "0.9" env_logger = "0.9"

View File

@ -14,8 +14,8 @@ path = "src/client.rs"
[dependencies] [dependencies]
actix = "0.12" actix = "0.12"
actix-codec = "0.4.1" actix-codec = "0.4.1"
actix-files = "0.6.0-beta.16" actix-files = "0.6"
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-web-actors = "4.0.0-beta.11" actix-web-actors = "4.0.0-beta.11"
byteorder = "1.2" byteorder = "1.2"

View File

@ -107,7 +107,7 @@ impl Handler<Connect> for ChatServer {
println!("Someone joined"); println!("Someone joined");
// notify all users in same room // notify all users in same room
self.send_message(&"Main".to_owned(), "Someone joined", 0); self.send_message("Main", "Someone joined", 0);
// register session with random id // register session with random id
let id = self.rng.gen::<usize>(); let id = self.rng.gen::<usize>();

View File

@ -9,8 +9,8 @@ path = "src/main.rs"
[dependencies] [dependencies]
actix = "0.12" actix = "0.12"
actix-files = "0.6.0-beta.16" actix-files = "0.6"
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-web-actors = "4.0.0-beta.12" actix-web-actors = "4.0.0-beta.12"
env_logger = "0.9" env_logger = "0.9"

View File

@ -14,9 +14,9 @@ path = "src/client.rs"
[dependencies] [dependencies]
actix = "0.12" actix = "0.12"
actix-codec = "0.5" actix-codec = "0.5"
actix-files = "0.6.0-beta.16" actix-files = "0.6"
actix-rt = "2" actix-rt = "2"
actix-web = "4.0.0-rc.3" actix-web = "4"
actix-web-actors = "4.0.0-beta.12" actix-web-actors = "4.0.0-beta.12"
awc = "3.0.0-beta.21" awc = "3.0.0-beta.21"