From 0b926a8880703d54279cf32fcc8c62cf181d72f1 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 12:00:25 -0700 Subject: [PATCH 01/13] Bumped versions and updated to async/await. --- .vscode/launch.json | 45 + Cargo.lock | 2598 +++++++++++++++++----------------- Cargo.toml | 33 +- src/app/articles/comments.rs | 92 +- src/app/articles/mod.rs | 247 ++-- src/app/mod.rs | 135 +- src/app/profiles.rs | 110 +- src/app/tags.rs | 16 +- src/app/users.rs | 92 +- src/db/articles.rs | 34 +- src/db/auth.rs | 2 +- src/db/comments.rs | 10 +- src/db/profiles.rs | 6 +- src/db/tags.rs | 2 +- src/db/users.rs | 8 +- src/main.rs | 12 +- src/models/article.rs | 6 +- src/models/article_tag.rs | 4 +- src/models/comment.rs | 2 +- src/models/follower.rs | 4 +- src/models/user.rs | 4 +- src/utils/auth.rs | 17 +- src/utils/jwt.rs | 5 +- 23 files changed, 1789 insertions(+), 1695 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..2f88b47 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,45 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'conduit'", + "cargo": { + "args": [ + "build", + "--bin=conduit", + "--package=conduit" + ], + "filter": { + "name": "conduit", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'conduit'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=conduit", + "--package=conduit" + ], + "filter": { + "name": "conduit", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 1295c79..a5e8287 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,2374 +1,2434 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "actix" -version = "0.8.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f728064aca1c318585bf4bb04ffcfac9e75e508ab4e8b1bd9ba5dfe04e2cbed5" dependencies = [ - "actix-http 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-rt 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt", + "actix_derive", + "bitflags", + "bytes", + "crossbeam-channel", + "futures-core", + "futures-sink", + "futures-task", + "futures-util", + "log", + "once_cell", + "parking_lot 0.12.1", + "pin-project-lite", + "smallvec 1.10.0", + "tokio", + "tokio-util", ] [[package]] name = "actix-codec" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-connect" -version = "0.2.5" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57a7559404a7f3573127aab53c08ce37a6c6a315c374a31070f3c91cd1b4a7fe" dependencies = [ - "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-rt 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-utils 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "bytes", + "futures-core", + "futures-sink", + "log", + "memchr", + "pin-project-lite", + "tokio", + "tokio-util", ] [[package]] name = "actix-cors" -version = "0.1.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b340e9cfa5b08690aae90fb61beb44e9b06f44fe3d0f93781aaa58cfba86245e" dependencies = [ - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils", + "actix-web", + "derive_more", + "futures-util", + "log", + "once_cell", + "smallvec 1.10.0", ] [[package]] name = "actix-http" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-connect 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-utils 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.19 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "flate2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", +version = "3.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c83abf9903e1f0ad9973cc4f7b9767fd5a03a583f51a5b7a339e07987cd2724" +dependencies = [ + "actix-codec", + "actix-rt", + "actix-service", + "actix-utils", + "ahash", + "base64", + "bitflags", + "brotli", + "bytes", + "bytestring", + "derive_more", + "encoding_rs", + "flate2", + "futures-core", + "h2", + "http", + "httparse", + "httpdate", + "itoa 1.0.4", + "language-tags", + "local-channel", + "mime", + "percent-encoding", + "pin-project-lite", + "rand 0.8.5", + "sha1", + "smallvec 1.10.0", + "tracing", + "zstd", +] + +[[package]] +name = "actix-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "465a6172cf69b960917811022d8f29bc0b7fa1398bc4f78b3c466673db1213b6" +dependencies = [ + "quote 1.0.21", + "syn 1.0.103", ] [[package]] name = "actix-router" -version = "0.1.5" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytestring", + "http", + "regex", + "serde", + "tracing", ] [[package]] name = "actix-rt" -version = "0.2.5" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ea16c295198e958ef31930a6ef37d0fb64e9ca3b6116e6b93a8bdae96ee1000" dependencies = [ - "actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-macros", + "futures-core", + "tokio", ] [[package]] name = "actix-server" -version = "0.6.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0da34f8e659ea1b077bb4637948b815cd3768ad5a188fdcd74ff4d84240cd824" dependencies = [ - "actix-rt 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt", + "actix-service", + "actix-utils", + "futures-core", + "futures-util", + "mio", + "num_cpus", + "socket2", + "tokio", + "tracing", ] [[package]] -name = "actix-server-config" -version = "0.1.2" +name = "actix-service" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" dependencies = [ - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "paste", + "pin-project-lite", ] [[package]] -name = "actix-service" -version = "0.4.2" +name = "actix-utils" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" dependencies = [ - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "local-waker", + "pin-project-lite", ] [[package]] -name = "actix-threadpool" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", +name = "actix-web" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d48f7b6534e06c7bfc72ee91db7917d4af6afe23e7d223b51e68fffbb21e96b9" +dependencies = [ + "actix-codec", + "actix-http", + "actix-macros", + "actix-router", + "actix-rt", + "actix-server", + "actix-service", + "actix-utils", + "actix-web-codegen", + "ahash", + "bytes", + "bytestring", + "cfg-if 1.0.0", + "cookie", + "derive_more", + "encoding_rs", + "futures-core", + "futures-util", + "http", + "itoa 1.0.4", + "language-tags", + "log", + "mime", + "once_cell", + "pin-project-lite", + "regex", + "serde", + "serde_json", + "serde_urlencoded", + "smallvec 1.10.0", + "socket2", + "time 0.3.17", + "url", ] [[package]] -name = "actix-utils" -version = "0.4.5" +name = "actix-web-codegen" +version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa9362663c8643d67b2d5eafba49e4cb2c8a053a29ed00a0bea121f17c76b13" dependencies = [ - "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-router", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", ] [[package]] -name = "actix-web" -version = "1.0.7" +name = "actix_derive" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d44b8fee1ced9671ba043476deddef739dd0959bf77030b26b738cc591737a7" dependencies = [ - "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-http 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-router 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-rt 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-utils 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web-codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "awc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "encoding_rs 0.8.19 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", ] [[package]] -name = "actix-web-codegen" -version = "0.1.2" +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "ahash" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "once_cell", + "version_check 0.9.4", ] [[package]] -name = "actix_derive" -version = "0.4.0" +name = "aho-corasick" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] -name = "adler32" -version = "1.0.3" +name = "alloc-no-stdlib" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" [[package]] -name = "aho-corasick" -version = "0.7.3" +name = "alloc-stdlib" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "alloc-no-stdlib", ] [[package]] -name = "antidote" -version = "1.0.0" +name = "android_system_properties" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] [[package]] -name = "arc-swap" -version = "0.3.11" +name = "antidote" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" [[package]] name = "arrayref" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" [[package]] name = "arrayvec" -version = "0.4.10" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" [[package]] name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" dependencies = [ - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "termion", + "winapi", ] [[package]] name = "autocfg" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf" [[package]] -name = "awc" -version = "0.2.6" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-http 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a13fc43f04daf08ab4f71e3d27e1fc27fc437d3e95ac0063a796d92fb40f39b" dependencies = [ - "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.4", + "backtrace-sys", + "cfg-if 0.1.9", + "libc", + "rustc-demangle", ] [[package]] name = "backtrace-sys" version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" dependencies = [ - "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", ] [[package]] name = "base32" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "base64" -version = "0.9.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "23ce669cd6c8588f79e15cf450314f9638f967fc5770ff1c7c1deb0925ea7cfa" [[package]] name = "base64" -version = "0.10.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "bitflags" -version = "1.0.4" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "blake2-rfc" -version = "0.2.18" +name = "blake2b_simd" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127" dependencies = [ - "arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "arrayref", + "arrayvec", + "constant_time_eq", ] [[package]] name = "blob-uuid" -version = "0.3.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc15853171b33280f5614e77f5fa4debd33f51a86c44daa4ba3d759674c561" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "base64", + "uuid", ] [[package]] name = "block-buffer" -version = "0.3.3" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ - "arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", ] [[package]] -name = "brotli-sys" -version = "0.3.2" +name = "brotli" +version = "3.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" dependencies = [ - "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", ] [[package]] -name = "brotli2" -version = "0.3.2" +name = "brotli-decompressor" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ad2d4653bf5ca36ae797b1f4bb4dbddb60ce49ca4aed8a2ce4829f60425b80" dependencies = [ - "brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "alloc-no-stdlib", + "alloc-stdlib", ] [[package]] -name = "build_const" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "byte-tools" -version = "0.2.0" +name = "bumpalo" +version = "3.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" [[package]] name = "byteorder" version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" [[package]] name = "bytes" -version = "0.4.12" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" [[package]] -name = "c2-chacha" -version = "0.2.2" +name = "bytestring" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7f83e57d9154148e355404702e2694463241880b939570d7c97c014da7a69a1" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", ] [[package]] name = "cc" -version = "1.0.37" +version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a284da2e6fe2092f2353e51713435363112dfd60030e22add80be333fb928f" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.6" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" dependencies = [ - "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", + "iana-time-zone", + "js-sys", + "num-integer", + "num-traits", + "time 0.1.44", + "wasm-bindgen", + "winapi", ] [[package]] name = "cloudabi" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", +] + +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", ] [[package]] name = "conduit" version = "0.1.0" dependencies = [ - "actix 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-cors 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-http 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", - "blob-uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "dotenv 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)", - "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libreauth 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", - "validator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "validator_derive 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix", + "actix-cors", + "actix-http", + "actix-rt", + "actix-service", + "actix-web", + "blob-uuid", + "chrono", + "diesel", + "dotenv", + "env_logger", + "failure", + "futures", + "http", + "jsonwebtoken", + "lazy_static", + "libreauth", + "log", + "num_cpus", + "regex", + "serde", + "serde_derive", + "serde_json", + "slug", + "uuid", + "validator", ] [[package]] name = "constant_time_eq" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] -name = "copyless" -version = "0.1.4" +name = "convert_case" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] -name = "crc" -version = "1.8.1" +name = "cookie" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "344adc371239ef32293cb1c4fe519592fcf21206c79c02854320afcdf3ab4917" dependencies = [ - "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding", + "time 0.3.17", + "version_check 0.9.4", ] [[package]] -name = "crc32fast" -version = "1.2.0" +name = "core-foundation-sys" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" + +[[package]] +name = "cpufeatures" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] -name = "crossbeam" -version = "0.2.12" +name = "crc32fast" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +dependencies = [ + "cfg-if 0.1.9", +] [[package]] name = "crossbeam-channel" -version = "0.3.8" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.6.5" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" +dependencies = [ + "cfg-if 1.0.0", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", + "typenum", ] [[package]] name = "crypto-mac" -version = "0.6.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", + "subtle", ] [[package]] -name = "derive_more" -version = "0.14.1" +name = "cxx" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97abf9f0eca9e52b7f81b945524e76710e6cb2366aead23b7d4fbf72e281f888" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cc32cc5fea1d894b77d269ddb9f192110069a8a9c1f1d441195fba90553dea3" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2 1.0.47", + "quote 1.0.21", + "scratch", + "syn 1.0.103", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.81" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca220e4794c934dc6b1207c3b42856ad4c302f2df1712e9f8d2eec5afaacf1f" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b846f081361125bfc8dc9d3940c84e1fd83ba54bbca7b17cd29483c828be0704" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", ] [[package]] name = "derive_more" -version = "0.15.0" +version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", + "convert_case", + "proc-macro2 1.0.47", + "quote 1.0.21", + "rustc_version 0.4.0", + "syn 1.0.103", ] [[package]] name = "deunicode" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" [[package]] name = "diesel" -version = "1.4.2" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68c186a7418a2aac330bb76cde82f16c36b03a66fb91db32d20214311f9f6545" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "r2d2 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "byteorder", + "chrono", + "diesel_derives", + "itoa 1.0.4", + "pq-sys", + "r2d2", + "serde_json", + "uuid", ] [[package]] name = "diesel_derives" -version = "1.4.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143b758c91dbc3fe1fdcb0dba5bd13276c6a66422f2ef5795b58488248a310aa" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-error", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", ] [[package]] name = "digest" -version = "0.7.6" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" dependencies = [ - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "block-buffer", + "crypto-common", + "subtle", ] [[package]] name = "dotenv" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" + +[[package]] +name = "encoding_rs" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79906e1ad1f7f8bc48864fcc6ffd58336fb5992e627bf61928099cb25fdf4314" dependencies = [ - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.9", ] [[package]] -name = "dtoa" -version = "0.4.4" +name = "env_logger" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] [[package]] -name = "either" -version = "1.5.3" +name = "failure" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" +dependencies = [ + "backtrace", + "failure_derive", +] [[package]] -name = "encoding_rs" -version = "0.8.19" +name = "failure_derive" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.12", + "syn 0.15.34", + "synstructure", ] [[package]] -name = "enum-as-inner" -version = "0.2.1" +name = "flate2" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", + "crc32fast", + "miniz_oxide", ] [[package]] -name = "env_logger" -version = "0.6.1" +name = "fnv" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" + +[[package]] +name = "form_urlencoded" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ - "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "percent-encoding", ] [[package]] -name = "failure" -version = "0.1.5" +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "futures" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" dependencies = [ - "backtrace 0.3.26 (registry+https://github.com/rust-lang/crates.io-index)", - "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "failure_derive" -version = "0.1.5" +name = "futures-channel" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", - "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-sink", ] [[package]] -name = "fake-simd" -version = "0.1.2" +name = "futures-core" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] -name = "flate2" -version = "1.0.7" +name = "futures-executor" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" dependencies = [ - "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-task", + "futures-util", ] [[package]] -name = "fnv" -version = "1.0.6" +name = "futures-io" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" [[package]] -name = "fuchsia-cprng" -version = "0.1.1" +name = "futures-macro" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +dependencies = [ + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", +] [[package]] -name = "fuchsia-zircon" -version = "0.3.3" +name = "futures-sink" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" +name = "futures-task" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" [[package]] -name = "futures" -version = "0.1.27" +name = "futures-util" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] [[package]] name = "generic-array" -version = "0.9.0" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ - "typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "typenum", + "version_check 0.9.4", ] [[package]] name = "getrandom" -version = "0.1.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "h2" -version = "0.1.20" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", - "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] name = "hashbrown" -version = "0.3.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] -name = "hashbrown" -version = "0.5.0" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] [[package]] name = "hex" -version = "0.3.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "hmac" -version = "0.6.3" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "crypto-mac 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", + "digest", ] [[package]] -name = "hostname" -version = "0.1.5" +name = "http" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "fnv", + "itoa 1.0.4", ] [[package]] -name = "http" -version = "0.1.17" +name = "httparse" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] -name = "httparse" -version = "1.3.3" +name = "httpdate" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "humantime" -version = "1.2.0" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "iana-time-zone" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" dependencies = [ - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi", ] [[package]] -name = "idna" -version = "0.1.5" +name = "iana-time-zone-haiku" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "cxx", + "cxx-build", ] [[package]] name = "idna" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] name = "if_chain" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "indexmap" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" [[package]] -name = "iovec" -version = "0.1.2" +name = "indexmap" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.1.0", + "hashbrown", ] [[package]] -name = "ipconfig" -version = "0.2.1" +name = "itoa" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "socket2 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" [[package]] name = "itoa" -version = "0.4.4" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" [[package]] -name = "jsonwebtoken" -version = "5.0.1" +name = "jobserver" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" dependencies = [ - "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] -name = "keccak" -version = "0.1.0" +name = "js-sys" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] [[package]] -name = "kernel32-sys" -version = "0.2.2" +name = "jsonwebtoken" +version = "8.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa4b4af834c6cfd35d8763d359661b90f2e45d8f750a0849156c7f4671af09c" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64", + "pem", + "ring", + "serde", + "serde_json", + "simple_asn1", ] +[[package]] +name = "keccak" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" + [[package]] name = "language-tags" -version = "0.2.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" [[package]] name = "lazy_static" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" [[package]] name = "libc" -version = "0.2.55" +version = "0.2.137" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" [[package]] name = "libreauth" -version = "0.11.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4276be7c1dc67e9cb388af7ca3a567a1ab615a7b3c111a1d4bd6cccd290d3d23" dependencies = [ - "base32 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "pbkdf2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rust-argon2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sha-1 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "sha3 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "base32", + "base64", + "crypto-mac", + "getrandom", + "hex", + "hmac", + "nom", + "pbkdf2", + "rust-argon2", + "sha-1", + "sha2", + "sha3", + "unicode-normalization", ] [[package]] -name = "linked-hash-map" -version = "0.5.2" +name = "link-cplusplus" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +dependencies = [ + "cc", +] [[package]] -name = "lock_api" -version = "0.1.5" +name = "local-channel" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f303ec0e94c6c54447f84f3b0ef7af769858a9c4ef56ef2a986d3dcd4c3fc9c" dependencies = [ - "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core", + "futures-sink", + "futures-util", + "local-waker", ] [[package]] -name = "lock_api" -version = "0.2.0" +name = "local-waker" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" [[package]] name = "lock_api" -version = "0.3.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" dependencies = [ - "scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref", + "scopeguard 0.3.3", ] [[package]] -name = "log" -version = "0.4.6" +name = "lock_api" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.1.0", + "scopeguard 1.1.0", ] [[package]] -name = "lru-cache" -version = "0.1.2" +name = "log" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", ] [[package]] name = "matches" version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "memchr" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "mime" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz-sys" -version = "0.1.12" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "miniz_oxide" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] -name = "miniz_oxide_c_api" -version = "0.2.1" +name = "mime" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" dependencies = [ - "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unicase", ] [[package]] -name = "mio" -version = "0.6.19" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] -name = "mio-uds" -version = "0.6.7" +name = "miniz_oxide" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "adler", ] [[package]] -name = "miow" -version = "0.2.1" +name = "mio" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] -name = "net2" -version = "0.2.33" +name = "nom" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", + "minimal-lexical", ] [[package]] -name = "nodrop" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "nom" -version = "4.2.3" +name = "num-bigint" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.1.0", + "num-integer", + "num-traits", ] [[package]] name = "num-integer" -version = "0.1.41" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.1.0", + "num-traits", ] [[package]] name = "num-traits" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.1.0", ] [[package]] name = "num_cpus" -version = "1.10.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5" dependencies = [ - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", ] [[package]] name = "numtoa" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" + +[[package]] +name = "once_cell" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860" [[package]] name = "owning_ref" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" dependencies = [ - "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "stable_deref_trait", ] [[package]] name = "parking_lot" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" dependencies = [ - "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.1.5", + "parking_lot_core 0.4.0", ] [[package]] name = "parking_lot" -version = "0.8.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.4.9", + "parking_lot_core 0.9.4", ] [[package]] -name = "parking_lot" -version = "0.9.0" +name = "parking_lot_core" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" dependencies = [ - "lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "rand 0.6.5", + "rustc_version 0.2.3", + "smallvec 0.6.9", + "winapi", ] [[package]] name = "parking_lot_core" -version = "0.4.0" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" dependencies = [ - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "libc", + "redox_syscall 0.2.16", + "smallvec 1.10.0", + "windows-sys", ] [[package]] -name = "parking_lot_core" -version = "0.5.0" +name = "paste" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "b1de2e551fb905ac83f73f7aedf2f0cb4a0da7e35efa24a202a936269f1f18e1" [[package]] -name = "parking_lot_core" -version = "0.6.2" +name = "pbkdf2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "digest", ] [[package]] -name = "pbkdf2" -version = "0.2.3" +name = "pem" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c64931a1a212348ec4f3b4362585eca7159d0d09cbdf4a7f74f02173596fd4" dependencies = [ - "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crypto-mac 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64", ] [[package]] name = "percent-encoding" -version = "1.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] -name = "percent-encoding" -version = "2.1.0" +name = "pin-project-lite" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "ppv-lite86" -version = "0.2.5" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pq-sys" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" +dependencies = [ + "vcpkg", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", + "version_check 0.9.4", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.47", + "quote 1.0.21", + "version_check 0.9.4", ] [[package]] name = "proc-macro2" version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid", ] [[package]] -name = "quick-error" -version = "1.2.2" +name = "proc-macro2" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +dependencies = [ + "unicode-ident", +] [[package]] name = "quote" version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", ] [[package]] -name = "r2d2" -version = "0.8.4" +name = "quote" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "scheduled-thread-pool 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.47", ] [[package]] -name = "rand" -version = "0.5.6" +name = "r2d2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dd8a293251281a4d02848925fcdbbc9f466ddb4965981bb06680359b3d12091" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "parking_lot 0.7.1", + "scheduled-thread-pool", ] [[package]] name = "rand" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" dependencies = [ - "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.4", + "libc", + "rand_chacha 0.1.1", + "rand_core 0.4.0", + "rand_hc", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift", + "winapi", ] [[package]] name = "rand" -version = "0.7.1" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", ] [[package]] name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" dependencies = [ - "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.4", + "rand_core 0.3.1", ] [[package]] name = "rand_chacha" -version = "0.2.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ - "c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86", + "rand_core 0.6.4", ] [[package]] name = "rand_core" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" dependencies = [ - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.4.0", ] [[package]] name = "rand_core" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" [[package]] name = "rand_core" -version = "0.5.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", ] [[package]] name = "rand_hc" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rand_isaac" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rand_jitter" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" dependencies = [ - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "rand_core 0.4.0", + "winapi", ] [[package]] name = "rand_os" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.0", + "rdrand", + "winapi", ] [[package]] name = "rand_pcg" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" dependencies = [ - "autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 0.1.4", + "rand_core 0.4.0", ] [[package]] name = "rand_xorshift" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rdrand" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "redox_syscall" version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" [[package]] -name = "redox_termios" -version = "0.1.1" +name = "redox_syscall" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", ] [[package]] -name = "regex" -version = "1.1.6" +name = "redox_termios" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" dependencies = [ - "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.54", ] [[package]] -name = "regex-syntax" -version = "0.6.6" +name = "regex" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e076559ef8e241f2ae3479e36f97bd5741c0330689e217ad51ce2c76808b868a" dependencies = [ - "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] -name = "resolv-conf" -version = "0.6.2" +name = "regex-syntax" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "ring" -version = "0.13.5" +version = "0.16.20" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ - "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", ] [[package]] name = "rust-argon2" -version = "0.3.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50162d19404029c1ceca6f6980fe40d45c8b369f6f44446fa14bb39573b5bb9" dependencies = [ - "blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "base64", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils", ] [[package]] name = "rustc-demangle" version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" [[package]] -name = "rustc-serialize" -version = "0.3.24" +name = "rustc_version" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] [[package]] name = "rustc_version" -version = "0.2.3" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver 1.0.14", ] [[package]] name = "ryu" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" [[package]] -name = "safemem" -version = "0.3.0" +name = "ryu" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "scheduled-thread-pool" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a2ff3fc5223829be817806c6441279c676e454cc7da608faf03b0ccc09d3889" dependencies = [ - "antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "antidote", ] [[package]] name = "scopeguard" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" [[package]] name = "scopeguard" -version = "1.0.0" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" + +[[package]] +name = "scratch" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" [[package]] name = "semver" version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "semver-parser", ] +[[package]] +name = "semver" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" + [[package]] name = "semver-parser" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.91" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" dependencies = [ - "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.91" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", ] [[package]] name = "serde_json" version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 0.4.4", + "ryu 0.2.8", + "serde", ] [[package]] name = "serde_urlencoded" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "form_urlencoded", + "itoa 1.0.4", + "ryu 1.0.11", + "serde", ] [[package]] name = "sha-1" -version = "0.7.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "028f48d513f9678cda28f6e4064755b3fbb2af6acd672f2c209b62323f7aea0f" dependencies = [ - "block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "cpufeatures", + "digest", ] [[package]] name = "sha1" -version = "0.6.0" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] [[package]] name = "sha2" -version = "0.7.1" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "cpufeatures", + "digest", ] [[package]] name = "sha3" -version = "0.7.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" dependencies = [ - "block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "digest", + "keccak", ] [[package]] -name = "signal-hook" -version = "0.1.9" +name = "signal-hook-registry" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" dependencies = [ - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook-registry 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", ] [[package]] -name = "signal-hook-registry" -version = "1.0.1" +name = "simple_asn1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" dependencies = [ - "arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", + "num-bigint", + "num-traits", + "thiserror", + "time 0.3.17", ] [[package]] name = "slab" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" [[package]] name = "slug" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" dependencies = [ - "deunicode 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "deunicode", ] [[package]] name = "smallvec" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" + +[[package]] +name = "smallvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.3.9" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "winapi", ] [[package]] name = "spin" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "stable_deref_trait" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" [[package]] -name = "string" -version = "0.1.3" +name = "subtle" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] -name = "string" -version = "0.2.1" +name = "syn" +version = "0.15.34" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.12", + "unicode-xid", ] [[package]] name = "syn" -version = "0.15.34" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.47", + "quote 1.0.21", + "unicode-ident", ] [[package]] name = "synstructure" version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.12", + "syn 0.15.34", + "unicode-xid", ] [[package]] name = "termcolor" -version = "1.0.4" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ - "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-util", ] [[package]] name = "termion" version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" dependencies = [ - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "numtoa", + "redox_syscall 0.1.54", + "redox_termios", ] [[package]] -name = "thread_local" -version = "0.3.6" +name = "thiserror" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "thiserror-impl", ] [[package]] -name = "threadpool" -version = "1.7.1" +name = "thiserror-impl" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", ] [[package]] name = "time" -version = "0.1.42" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", + "winapi", ] [[package]] -name = "tokio-codec" -version = "0.1.1" +name = "time" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", + "itoa 1.0.4", + "serde", + "time-core", + "time-macros", ] [[package]] -name = "tokio-current-thread" -version = "0.1.6" +name = "time-core" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] -name = "tokio-executor" -version = "0.1.7" +name = "time-macros" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "time-core", ] [[package]] -name = "tokio-io" -version = "0.1.12" +name = "tokio" +version = "1.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", + "autocfg 1.1.0", + "bytes", + "libc", + "memchr", + "mio", + "parking_lot 0.12.1", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "winapi", ] [[package]] -name = "tokio-reactor" -version = "0.1.9" +name = "tokio-util" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", ] [[package]] -name = "tokio-signal" -version = "0.2.7" +name = "tracing" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "log", + "pin-project-lite", + "tracing-core", ] [[package]] -name = "tokio-sync" -version = "0.1.5" +name = "tracing-core" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", + "once_cell", ] [[package]] -name = "tokio-tcp" -version = "0.1.3" +name = "typenum" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] -name = "tokio-timer" -version = "0.2.11" +name = "unicase" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" dependencies = [ - "crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.1.5", ] [[package]] -name = "tokio-udp" -version = "0.1.3" +name = "unicode-bidi" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "matches", ] [[package]] -name = "trust-dns-proto" -version = "0.7.4" +name = "unicode-ident" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] -name = "trust-dns-resolver" -version = "0.11.1" +name = "unicode-normalization" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" dependencies = [ - "cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)", - "ipconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "trust-dns-proto 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 0.6.9", ] [[package]] -name = "typenum" -version = "1.10.0" +name = "unicode-width" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] -name = "ucd-util" -version = "0.1.3" +name = "unicode-xid" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" [[package]] -name = "unicase" -version = "2.4.0" +name = "untrusted" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] -name = "unicode-bidi" -version = "0.3.4" +name = "url" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" dependencies = [ - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "idna", + "matches", + "percent-encoding", ] [[package]] -name = "unicode-normalization" -version = "0.1.8" +name = "uuid" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "feb41e78f93363bb2df8b0e86a2ca30eed7806ea16ea0c790d757cf93f79be83" dependencies = [ - "smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "serde", ] [[package]] -name = "unicode-xid" -version = "0.1.0" +name = "validator" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32ad5bf234c7d3ad1042e5252b7eddb2c4669ee23f32c7dd0e9b7705f07ef591" +dependencies = [ + "idna", + "lazy_static", + "regex", + "serde", + "serde_derive", + "serde_json", + "url", + "validator_derive", +] [[package]] -name = "untrusted" -version = "0.6.2" +name = "validator_derive" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc44ca3088bb3ba384d9aecf40c6a23a676ce23e09bdaca2073d99c207f864af" +dependencies = [ + "if_chain", + "lazy_static", + "proc-macro-error", + "proc-macro2 1.0.47", + "quote 1.0.21", + "regex", + "syn 1.0.103", + "validator_types", +] [[package]] -name = "url" -version = "1.7.2" +name = "validator_types" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111abfe30072511849c5910134e8baf8dc05de4c0e5903d681cbd5c9c4d611e3" dependencies = [ - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.47", + "syn 1.0.103", ] [[package]] -name = "url" -version = "2.1.0" +name = "vcpkg" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" [[package]] -name = "utf8-ranges" -version = "1.0.2" +name = "version_check" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" [[package]] -name = "uuid" -version = "0.7.4" +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "validator" -version = "0.8.0" +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] -name = "validator_derive" -version = "0.8.0" +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", - "validator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 1.0.0", + "wasm-bindgen-macro", ] [[package]] -name = "vcpkg" -version = "0.2.6" +name = "wasm-bindgen-backend" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", + "wasm-bindgen-shared", +] [[package]] -name = "version_check" -version = "0.1.5" +name = "wasm-bindgen-macro" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote 1.0.21", + "wasm-bindgen-macro-support", +] [[package]] -name = "widestring" -version = "0.4.0" +name = "wasm-bindgen-macro-support" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2 1.0.47", + "quote 1.0.21", + "syn 1.0.103", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] [[package]] -name = "winapi" -version = "0.2.8" +name = "wasm-bindgen-shared" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] -name = "winapi" -version = "0.3.7" +name = "web-sys" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "js-sys", + "wasm-bindgen", ] [[package]] -name = "winapi-build" -version = "0.1.1" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "wincolor" -version = "1.0.1" +name = "windows-sys" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] -name = "winreg" -version = "0.6.2" +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "zstd-safe", ] [[package]] -name = "winutil" -version = "0.1.1" +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "zstd-sys", ] [[package]] -name = "ws2_32-sys" -version = "0.2.1" +name = "zstd-sys" +version = "2.0.1+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[metadata] -"checksum actix 0.8.3 (registry+https://github.com/rust-lang/crates.io-index)" = "671ce3d27313f236827a5dd153a1073ad03ef31fc77f562020263e7830cf1ef7" -"checksum actix-codec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9f2c11af4b06dc935d8e1b1491dad56bfb32febc49096a91e773f8535c176453" -"checksum actix-connect 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "9fade9bd4bb46bacde89f1e726c7a3dd230536092712f5d94d77ca57c087fca0" -"checksum actix-cors 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "66e5b071c68ac8ab182e7b7717167ef29ea93e166bc26391f678f19ac08ed129" -"checksum actix-http 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf758ebbc4abfecbdc1ce7408601b2d7e0cd7e4766ef61183cd8ce16c194d64" -"checksum actix-router 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "23224bb527e204261d0291102cb9b52713084def67d94f7874923baefe04ccf7" -"checksum actix-rt 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "168620aaf00fcd2a16e621790abaf180ef7377c2f8355b4ca5775d6afc778ed8" -"checksum actix-server 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb3038e9e457e0a498ea682723e0f4e6cc2c4f362a1868d749808355275ad959" -"checksum actix-server-config 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "483a34989c682d93142bacad6300375bb6ad8002d2e0bb249dbad86128b9ff30" -"checksum actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bca5b48e928841ff7e7dce1fdb5b0d4582f6b1b976e08f4bac3f640643e0773f" -"checksum actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b5ae85d13da7e6fb86b1b7bc83185e0e3bd4cc5f421c887e1803796c034d35d" -"checksum actix-utils 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6ea501068a0173533704be321f149853f702d9e3c3ce9d57e7a96d94b1ab5aca" -"checksum actix-web 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8ced216f53d465f9d6478454b2b994d1fe91ec203ac9d056837cbe07e823cb83" -"checksum actix-web-codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3fe9e3cdec1e645b675f354766e0688c5705021c85ab3cf739be1c8999b91c76" -"checksum actix_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0bf5f6d7bf2d220ae8b4a7ae02a572bb35b7c4806b24049af905ab8110de156c" -"checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c" -"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" -"checksum antidote 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "34fde25430d87a9388dadbe6e34d7f72a462c8b43ac8d309b42b0a8505d7e2a5" -"checksum arc-swap 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "bc4662175ead9cd84451d5c35070517777949a2ed84551764129cedb88384841" -"checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" -"checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71" -"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" -"checksum autocfg 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0e49efa51329a5fd37e7c79db4621af617cd4e3e5bc224939808d076077077bf" -"checksum awc 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "78c9c1e32d6084343b3857eacb1f43aaefb93a816e15aae4685bc3c0a9052964" -"checksum backtrace 0.3.26 (registry+https://github.com/rust-lang/crates.io-index)" = "1a13fc43f04daf08ab4f71e3d27e1fc27fc437d3e95ac0063a796d92fb40f39b" -"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" -"checksum base32 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1b9605ba46d61df0410d8ac686b0007add8172eba90e8e909c347856fe794d8c" -"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" -"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" -"checksum blake2-rfc 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6d530bdd2d52966a6d03b7a964add7ae1a288d25214066fd4b600f0f796400" -"checksum blob-uuid 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "72e36773f0b5936b85fcbe7d933fd35e787dad7a643e812340d07c8da0546d13" -"checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" -"checksum brotli-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" -"checksum brotli2 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" -"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" -"checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" -"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" -"checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -"checksum c2-chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7d64d04786e0f528460fc884753cf8dddcc466be308f6026f8e355c41a0e4101" -"checksum cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)" = "39f75544d7bbaf57560d2168f28fd649ff9c76153874db88bdbdfd839b1a7e7d" -"checksum cfg-if 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "b486ce3ccf7ffd79fdeb678eac06a9e6c09fc88d33836340becb8fffe87c5e33" -"checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum constant_time_eq 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8ff012e225ce166d4422e0e78419d901719760f62ae2b7969ca6b564d1b54a9e" -"checksum copyless 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "6ff9c56c9fb2a49c05ef0e431485a22400af20d33226dc0764d891d09e724127" -"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" -"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" -"checksum crossbeam 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "bd66663db5a988098a89599d4857919b3acf7f61402e61365acfd3919857b9be" -"checksum crossbeam-channel 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b" -"checksum crossbeam-utils 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f8306fcef4a7b563b76b7dd949ca48f52bc1141aa067d2ea09565f3e2652aa5c" -"checksum crypto-mac 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7afa06d05a046c7a47c3a849907ec303504608c927f4e85f7bfff22b7180d971" -"checksum derive_more 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6d944ac6003ed268757ef1ee686753b57efc5fcf0ebe7b64c9fc81e7e32ff839" -"checksum derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a141330240c921ec6d074a3e188a7c7ef95668bb95e7d44fa0e5778ec2a7afe" -"checksum deunicode 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" -"checksum diesel 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8d24935ba50c4a8dc375a0fd1f8a2ba6bdbdc4125713126a74b965d6a01a06d7" -"checksum diesel_derives 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "62a27666098617d52c487a41f70de23d44a1dc1f3aa5877ceba2790fb1f1cab4" -"checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90" -"checksum dotenv 0.14.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4424bad868b0ffe6ae351ee463526ba625bbca817978293bbe6bb7dc1804a175" -"checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e" -"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" -"checksum encoding_rs 0.8.19 (registry+https://github.com/rust-lang/crates.io-index)" = "79906e1ad1f7f8bc48864fcc6ffd58336fb5992e627bf61928099cb25fdf4314" -"checksum enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3d58266c97445680766be408285e798d3401c6d4c378ec5552e78737e681e37d" -"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" -"checksum failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "795bd83d3abeb9220f257e597aa0080a508b27533824adf336529648f6abf7e2" -"checksum failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "ea1063915fd7ef4309e222a5a07cf9c319fb9c7836b1f89b85458672dbb127e1" -"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum flate2 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f87e68aa82b2de08a6e037f1385455759df6e445a8df5e005b4297191dbf18aa" -"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" -"checksum futures 0.1.27 (registry+https://github.com/rust-lang/crates.io-index)" = "a2037ec1c6c1c4f79557762eab1f7eae1f64f6cb418ace90fae88f0942b60139" -"checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" -"checksum getrandom 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "e65cce4e5084b14874c4e7097f38cab54f47ee554f9194673456ea379dcc4c55" -"checksum h2 0.1.20 (registry+https://github.com/rust-lang/crates.io-index)" = "2b53def7bb0253af7718036fe9338c15defd209136819464384f3a553e07481b" -"checksum hashbrown 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "29fba9abe4742d586dfd0c06ae4f7e73a1c2d86b856933509b269d82cdf06e18" -"checksum hashbrown 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e1de41fb8dba9714efd92241565cdff73f78508c95697dd56787d3cba27e2353" -"checksum hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" -"checksum hmac 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "733e1b3ac906631ca01ebb577e9bb0f5e37a454032b9036b5eaea4013ed6f99a" -"checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" -"checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a" -"checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" -"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" -"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -"checksum idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" -"checksum if_chain 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4bac95d9aa0624e7b78187d6fb8ab012b41d9f6f54b1bcb61e61c4845f8357ec" -"checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" -"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum ipconfig 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aa79fa216fbe60834a9c0737d7fcd30425b32d1c58854663e24d4c4b328ed83f" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum jsonwebtoken 5.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8d438ea707d465c230305963b67f8357a1d56fcfad9434797d7cb1c46c2e41df" -"checksum keccak 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" -"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" -"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" -"checksum libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "42914d39aad277d9e176efbdad68acb1d5443ab65afe0e0e4f0d49352a950880" -"checksum libreauth 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9a1535855b60246e6179d5f096f5bf25524e3a7a1e18fa2d3c19549b3d697081" -"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" -"checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -"checksum lock_api 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ed946d4529956a20f2d63ebe1b69996d5a2137c91913fe3ebbeff957f5bca7ff" -"checksum lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f8912e782533a93a167888781b836336a6ca5da6175c05944c86cf28c31104dc" -"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" -"checksum lru-cache 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" -"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" -"checksum mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "3e27ca21f40a310bd06d9031785f4801710d566c184a6e15bad4f1d9b65f9425" -"checksum miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" -"checksum miniz_oxide 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c468f2369f07d651a5d0bb2c9079f8488a66d5466efe42d0c5c6466edcb7f71e" -"checksum miniz_oxide_c_api 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b7fe927a42e3807ef71defb191dc87d4e24479b221e67015fe38ae2b7b447bab" -"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" -"checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" -"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" -"checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945" -"checksum nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -"checksum num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "b85e541ef8255f6cf42bbfe4ef361305c6c135d10919ecc26126c4e5ae94bc09" -"checksum num-traits 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "6ba9a427cfca2be13aa6f6403b0b7e7368fe982bfa16fccc450ce74c46cd9b32" -"checksum num_cpus 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a23f0ed30a54abaa0c7e83b1d2d87ada7c3c23078d1d87815af3e3b6385fbba" -"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" -"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" -"checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" -"checksum parking_lot 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fa7767817701cce701d5585b9c4db3cdd02086398322c1d7e8bf5094a96a2ce7" -"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -"checksum parking_lot_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94c8c7923936b28d546dfd14d4472eaf34c99b14e1c973a32b3e6d4eb04298c9" -"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" -"checksum parking_lot_core 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -"checksum pbkdf2 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0c09cddfbfc98de7f76931acf44460972edb4023eb14d0c6d4018800e552d8e0" -"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" -"checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" -"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" -"checksum pq-sys 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6ac25eee5a0582f45a67e837e350d784e7003bd29a5f460796772061ca49ffda" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" -"checksum r2d2 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9dd8a293251281a4d02848925fcdbbc9f466ddb4965981bb06680359b3d12091" -"checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "59cea0d944b32347a1863e95942fd6ebdb486afb4f038119494f2860380c1d51" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -"checksum rand_chacha 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "03a2a90da8c7523f554344f921aa97283eadf6ac484a6d2a7d0212fa7f8d6853" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" -"checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -"checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" -"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" -"checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" -"checksum resolv-conf 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b263b4aa1b5de9ffc0054a2386f96992058bb6870aab516f8cdeb8a667d56dcb" -"checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" -"checksum rust-argon2 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1482290e06b6f6f9d6b7e34ae0af23532941cb6d6f7eab34a1d3a001038a3878" -"checksum rustc-demangle 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "a7f4dccf6f4891ebcc0c39f9b6eb1a83b9bf5d747cb439ec6fba4f3b977038af" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" -"checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" -"checksum scheduled-thread-pool 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1a2ff3fc5223829be817806c6441279c676e454cc7da608faf03b0ccc09d3889" -"checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" -"checksum scopeguard 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b42e15e59b18a828bbf5c58ea01debb36b9b096346de35d941dcb89009f24a0d" -"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" -"checksum serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd" -"checksum serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "101b495b109a3e3ca8c4cbe44cf62391527cdfb6ba15821c5ce80bcd5ea23f9f" -"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" -"checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" -"checksum sha-1 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "51b9d1f3b5de8a167ab06834a7c883bd197f2191e1dda1a22d9ccfeedbf9aded" -"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" -"checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" -"checksum sha3 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b64dcef59ed4290b9fb562b53df07f564690d6539e8ecdd4728cf392477530bc" -"checksum signal-hook 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "72ab58f1fda436857e6337dcb6a5aaa34f16c5ddc87b3a8b6ef7a212f90b9c5a" -"checksum signal-hook-registry 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cded4ffa32146722ec54ab1f16320568465aa922aa9ab4708129599740da85d7" -"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" -"checksum slug 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" -"checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be" -"checksum socket2 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "4e626972d3593207547f14bf5fc9efa4d0e7283deb73fef1dff313dae9ab8878" -"checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" -"checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" -"checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b" -"checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -"checksum syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" -"checksum synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "02353edf96d6e4dc81aea2d8490a7e9db177bf8acb0e951c24940bf866cb313f" -"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" -"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -"checksum threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e2f0c90a5f3459330ac8bc0d2f879c693bb7a2f59689c1083fc4ef83834da865" -"checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f" -"checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" -"checksum tokio-current-thread 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "d16217cad7f1b840c5a97dfb3c43b0c871fef423a6e8d2118c604e843662a443" -"checksum tokio-executor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "83ea44c6c0773cc034771693711c35c677b4b5a4b21b9e7071704c54de7d555e" -"checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" -"checksum tokio-reactor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6af16bfac7e112bea8b0442542161bfc41cbfa4466b580bdda7d18cb88b911ce" -"checksum tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6dc5276ea05ce379a16de90083ec80836440d5ef8a6a39545a3207373b8296" -"checksum tokio-sync 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "5b2f843ffdf8d6e1f90bddd48da43f99ab071660cd92b7ec560ef3cdfd7a409a" -"checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" -"checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" -"checksum tokio-udp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "66268575b80f4a4a710ef83d087fdfeeabdce9b74c797535fbac18a2cb906e92" -"checksum trust-dns-proto 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5559ebdf6c2368ddd11e20b11d6bbaf9e46deb803acd7815e93f5a7b4a6d2901" -"checksum trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6c9992e58dba365798803c0b91018ff6c8d3fc77e06977c4539af2a6bfe0a039" -"checksum typenum 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "612d636f949607bdf9b123b4a6f6d966dedf3ff669f7f045890d3a4a73948169" -"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" -"checksum unicase 2.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a84e5511b2a947f3ae965dcb29b13b7b1691b6e7332cf5dbc1744138d5acb7f6" -"checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" -"checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -"checksum url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "75b414f6c464c879d7f9babf951f23bc3743fb7313c081b2e6ca719067ea9d61" -"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" -"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -"checksum validator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "236a5eda3df2c877872e98dbc55d497d943792e6405d8fc65bd4f8a5e3b53c99" -"checksum validator_derive 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d360d6f5754972c0c1da14fb3d5580daa31aee566e1e45e2f8d3bf5950ecd3e9" -"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" -"checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" -"checksum widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "effc0e4ff8085673ea7b9b2e3c73f6bd4d118810c9009ed8f1e16bd96c331db6" -"checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" -"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" -"checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" -"checksum winreg 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -"checksum winutil 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7daf138b6b14196e3830a588acf1e86966c694d3e8fb026fb105b8b5dca07e6e" -"checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" + "cc", + "libc", +] diff --git a/Cargo.toml b/Cargo.toml index 0b1aaaf..212fa9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,22 +5,23 @@ authors = ["grey "] edition = "2018" [dependencies] -actix = "0.8.3" -actix-web = "1.0.7" -actix-cors = "0.1.0" -actix-service = "0.4.2" -actix-http = "0.2.10" -blob-uuid = "0.3.0" +actix = "0.13.0" +actix-rt = "2.7.0" +actix-web = "4.1.2" +actix-cors = "0.6.4" +actix-service = "2.0.2" +actix-http = "3.2.2" +blob-uuid = "0.5.0" chrono = "0.4.6" -diesel = { version = "1.4.2", features = ["chrono", "postgres", "r2d2", "uuidv07", "serde_json"] } -dotenv = "0.14.1" -env_logger = "0.6.1" +diesel = { version = "2.0.2", features = ["chrono", "postgres", "r2d2", "uuid", "serde_json"] } +dotenv = "0.15.0" +env_logger = "0.9.3" failure = "0.1.5" -futures = "0.1.25" -http = "0.1.16" -jsonwebtoken = "5.0.1" +futures = "0.3.25" +http = "0.2.8" +jsonwebtoken = "8.1.1" lazy_static = "1.3.0" -libreauth = "0.11.0" +libreauth = "0.15.0" log = "0.4.6" num_cpus = "1.10.0" regex = "1.1.6" @@ -28,6 +29,6 @@ serde = "1.0.91" serde_derive = "1.0.91" serde_json = "1.0.39" slug = "0.1.4" -uuid = { version = "0.7.4", features = ["serde", "v4"] } -validator = "0.8.0" -validator_derive = "0.8.0" +uuid = { version = "1.2", features = ["serde", "v4"] } +validator = { version = "0.16", features = ["derive"] } +#validator_derive = "0.16.0" diff --git a/src/app/articles/comments.rs b/src/app/articles/comments.rs index 46a5529..90da6c8 100644 --- a/src/app/articles/comments.rs +++ b/src/app/articles/comments.rs @@ -1,6 +1,4 @@ use actix_web::{HttpRequest, HttpResponse, web::Json, web::Path, web::Data}; -use actix_http::error::ResponseError; -use futures::{future::result, Future}; use validator::Validate; use super::super::AppState; @@ -30,7 +28,7 @@ pub struct ArticleCommentPath { #[derive(Debug, Validate, Deserialize)] pub struct AddComment { - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub body: String, } @@ -78,72 +76,60 @@ pub struct CommentListResponse { // Route handlers ↓ -pub fn add( +pub async fn add( state: Data, (path, form, req): ( Path, Json>, HttpRequest, ), -) -> impl Future { +) -> Result { let comment = form.into_inner().comment; - let db = state.db.clone(); - - result(comment.validate()) - .from_err() - .and_then(move |_| authenticate(&state, &req)) - .and_then(move |auth| { - db.send(AddCommentOuter { - auth, - slug: path.slug.to_owned(), - comment, - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + match comment.validate() { + Ok(()) => { + let auth = authenticate(&state, &req).await?; + let res = state.db + .send(AddCommentOuter { + auth, + slug: path.slug.to_owned(), + comment, + }) + .await??; + + Ok(HttpResponse::Ok().json(res)) + } + Err(err) => Ok(HttpResponse::BadRequest().json(err)), + } } -pub fn list( +pub async fn list( state: Data, (path, req): (Path, HttpRequest), -) -> impl Future { - let db = state.db.clone(); - - authenticate(&state, &req) - .then(move |auth| { - db.send(GetComments { - auth: auth.ok(), - slug: path.slug.to_owned(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), +) -> Result { + let auth = authenticate(&state, &req).await?; + let res = state.db + .send(GetComments { + auth: Some(auth), + slug: path.slug.to_owned(), }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } -pub fn delete( +pub async fn delete( state: Data, (path, req): (Path, HttpRequest), -) -> impl Future { - let db = state.db.clone(); - - authenticate(&state, &req) - .and_then(move |auth| { - db.send(DeleteComment { - auth, - slug: path.slug.to_owned(), - comment_id: path.comment_id.to_owned(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(_) => Ok(HttpResponse::Ok().finish()), - Err(e) => Ok(e.error_response()), +) -> Result { + let auth = authenticate(&state, &req).await?; + let res = state.db + .send(DeleteComment { + auth, + slug: path.slug.to_owned(), + comment_id: path.comment_id.to_owned(), }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } diff --git a/src/app/articles/mod.rs b/src/app/articles/mod.rs index 813eb46..7f16e8c 100644 --- a/src/app/articles/mod.rs +++ b/src/app/articles/mod.rs @@ -1,8 +1,5 @@ pub mod comments; - -use actix_web::{HttpRequest, HttpResponse, web::Json, web::Path, web::Query, web::Data}; -use actix_http::error::ResponseError; -use futures::{future::result, Future}; +use actix_web::{web::Data, web::Json, web::Path, web::Query, HttpRequest, HttpResponse}; use validator::Validate; use super::AppState; @@ -45,13 +42,13 @@ pub struct FeedParams { #[derive(Debug, Validate, Deserialize)] #[serde(rename_all = "camelCase")] pub struct CreateArticle { - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub title: String, - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub description: String, - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub body: String, - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub tag_list: Vec, } @@ -70,13 +67,13 @@ pub struct GetArticle { #[derive(Debug, Validate, Deserialize)] #[serde(rename_all = "camelCase")] pub struct UpdateArticle { - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub title: Option, - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub description: Option, - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub body: Option, - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub tag_list: Option>, } @@ -148,168 +145,152 @@ pub struct ArticleListResponse { // Route handlers ↓ -pub fn create( +pub async fn create( state: Data, (form, req): (Json>, HttpRequest), -) -> impl Future { +) -> Result { let article = form.into_inner().article; let db = state.db.clone(); - result(article.validate()) - .from_err() - .and_then(move |_| authenticate(&state, &req)) - .and_then(move |auth| db.send(CreateArticleOuter { auth, article }).from_err()) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + match article.validate() { + Ok(()) => { + let auth = authenticate(&state, &req).await?; + let res = db.send(CreateArticleOuter { auth, article }).await??; + + Ok(HttpResponse::Ok().json(res)) + } + Err(err) => Ok(HttpResponse::BadRequest().json(err)), + } } -pub fn get( +pub async fn get( state: Data, (path, req): (Path, HttpRequest), -) -> impl Future { +) -> Result { let db = state.db.clone(); - authenticate(&state, &req) - .then(move |auth| { - db.send(GetArticle { - auth: auth.ok(), - slug: path.slug.to_owned(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), + let auth = authenticate(&state, &req).await?; + let res = db + .send(GetArticle { + auth: Some(auth), + slug: path.slug.to_owned(), }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } -pub fn update( +pub async fn update( state: Data, - (path, form, req): ( - Path, - Json>, - HttpRequest, - ), -) -> impl Future { + (path, form, req): (Path, Json>, HttpRequest), +) -> Result { let article = form.into_inner().article; - let db = state.db.clone(); - result(article.validate()) - .from_err() - .and_then(move |_| authenticate(&state, &req)) - .and_then(move |auth| { - db.send(UpdateArticleOuter { - auth, - slug: path.slug.to_owned(), - article, - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + match article.validate() { + Ok(()) => { + let auth = authenticate(&state, &req).await?; + let res = db + .send(UpdateArticleOuter { + auth, + slug: path.slug.to_owned(), + article, + }) + .await??; + + Ok(HttpResponse::Ok().json(res)) + } + Err(err) => Ok(HttpResponse::BadRequest().json(err)), + } + + // result(article.validate()) + // .from_err() + // .and_then(move |_| authenticate(&state, &req)) + // .and_then(move |auth| { + // db.send(UpdateArticleOuter { + // auth, + // slug: path.slug.to_owned(), + // article, + // }) + // .from_err() + // }) + // .and_then(|res| match res { + // Ok(res) => Ok(HttpResponse::Ok().json(res)), + // Err(e) => Ok(e.error_response()), + // }) } -pub fn delete( +pub async fn delete( state: Data, (path, req): (Path, HttpRequest), -) -> impl Future { - authenticate(&state, &req) - .and_then(move |auth| { - state - .db - .send(DeleteArticle { - auth, - slug: path.slug.to_owned(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(_) => Ok(HttpResponse::Ok().finish()), - Err(e) => Ok(e.error_response()), +) -> Result { + let auth = authenticate(&state, &req).await?; + let res = state.db + .send(DeleteArticle { + auth, + slug: path.slug.to_owned(), }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } -pub fn favorite( +pub async fn favorite( state: Data, (path, req): (Path, HttpRequest), -) -> impl Future { - authenticate(&state, &req) - .and_then(move |auth| { - state - .db - .send(FavoriteArticle { - auth, - slug: path.slug.to_owned(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), +) -> Result { + let auth = authenticate(&state, &req).await?; + let res = state.db + .send(FavoriteArticle { + auth, + slug: path.slug.to_owned(), }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } -pub fn unfavorite( +pub async fn unfavorite( state: Data, (path, req): (Path, HttpRequest), -) -> impl Future { - authenticate(&state, &req) - .and_then(move |auth| { - state - .db - .send(UnfavoriteArticle { - auth, - slug: path.slug.to_owned(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), +) -> Result { + let auth = authenticate(&state, &req).await?; + let res = state.db + .send(UnfavoriteArticle { + auth, + slug: path.slug.to_owned(), }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } -pub fn list( +pub async fn list( state: Data, (req, params): (HttpRequest, Query), -) -> impl Future { - let db = state.db.clone(); - - authenticate(&state, &req) - .then(move |auth| { - db.send(GetArticles { - auth: auth.ok(), - params: params.into_inner(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), +) -> Result { + let auth = authenticate(&state, &req).await?; + let res = state.db + .send(GetArticles { + auth: Some(auth), + params: params.into_inner(), }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } -pub fn feed( +pub async fn feed( state: Data, (req, params): (HttpRequest, Query), -) -> impl Future { - let db = state.db.clone(); - - authenticate(&state, &req) - .and_then(move |auth| { - db.send(GetFeed { - auth, - params: params.into_inner(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), +) -> Result { + let auth = authenticate(&state, &req).await?; + let res = state.db + .send(GetFeed { + auth, + params: params.into_inner(), }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } diff --git a/src/app/mod.rs b/src/app/mod.rs index 69c633b..2502426 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -1,14 +1,13 @@ use crate::db::{new_pool, DbExecutor}; use actix::prelude::{Addr, SyncArbiter}; +use actix_cors::Cors; use actix_web::{ + http::header::{AUTHORIZATION, CONTENT_TYPE}, middleware::Logger, - web::Data, web, - App, HttpRequest, - HttpServer, - http::header::{AUTHORIZATION, CONTENT_TYPE}, + web::Data, + App, HttpRequest, HttpServer, }; -use actix_cors::Cors; use std::env; pub mod articles; @@ -20,16 +19,17 @@ pub struct AppState { pub db: Addr, } -fn index(_state: Data, _req: HttpRequest) -> &'static str { +async fn index(_state: Data, _req: HttpRequest) -> &'static str { "Hello world!" } -pub fn start() { +pub async fn start() -> std::io::Result<()> { let frontend_origin = env::var("FRONTEND_ORIGIN").ok(); let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set"); let database_pool = new_pool(database_url).expect("Failed to create pool."); - let database_address = SyncArbiter::start(num_cpus::get(), move || DbExecutor(database_pool.clone())); + let database_address = + SyncArbiter::start(num_cpus::get(), move || DbExecutor(database_pool.clone())); let bind_address = env::var("BIND_ADDRESS").expect("BIND_ADDRESS is not set"); @@ -38,79 +38,80 @@ pub fn start() { db: database_address.clone(), }; let cors = match frontend_origin { - Some(ref origin) => Cors::new() + Some(ref origin) => Cors::default() .allowed_origin(origin) .allowed_headers(vec![AUTHORIZATION, CONTENT_TYPE]) .max_age(3600), - None => Cors::new() + None => Cors::default() .allowed_origin("*") .send_wildcard() .allowed_headers(vec![AUTHORIZATION, CONTENT_TYPE]) .max_age(3600), }; App::new() - .register_data(Data::new(state)) + .app_data(Data::new(state)) .wrap(Logger::default()) .wrap(cors) .configure(routes) - }) - .bind(&bind_address) - .unwrap_or_else(|_| panic!("Could not bind server to address {}", &bind_address)) - .start(); + }) + .bind(&bind_address) + .unwrap_or_else(|_| panic!("Could not bind server to address {}", &bind_address)) + .run() + .await - println!("You can access the server at {}", bind_address); + //println!("You can access the server at {}", bind_address); } fn routes(app: &mut web::ServiceConfig) { - app - .service(web::resource("/").to(index)) - .service(web::scope("/api") - // User routes ↓ - .service(web::resource("users") - .route(web::post().to_async(users::register)) - ) - .service(web::resource("users/login") - .route(web::post().to_async(users::login)) - ) - .service(web::resource("user") - .route(web::get().to_async(users::get_current)) - .route(web::put().to_async(users::update)) - ) - // Profile routes ↓ - .service(web::resource("profiles/{username}") - .route(web::get().to_async(profiles::get)) - ) - .service(web::resource("profiles/{username}/follow") - .route(web::post().to_async(profiles::follow)) - .route(web::delete().to_async(profiles::unfollow)) - ) - // Article routes ↓ - .service(web::resource("articles") - .route(web::get().to_async(articles::list)) - .route(web::post().to_async(articles::create)) - ) - .service(web::resource("articles/feed") - .route(web::get().to_async(articles::feed)) - ) - .service(web::resource("articles/{slug}") - .route(web::get().to_async(articles::get)) - .route(web::put().to_async(articles::update)) - .route(web::delete().to_async(articles::delete)) - ) - .service(web::resource("articles/{slug}/favorite") - .route(web::post().to_async(articles::favorite)) - .route(web::delete().to_async(articles::unfavorite)) - ) - .service(web::resource("articles/{slug}/comments") - .route(web::get().to_async(articles::comments::list)) - .route(web::post().to_async(articles::comments::add)) - ) - .service(web::resource("articles/{slug}/comments/{comment_id}") - .route(web::delete().to_async(articles::comments::delete)) - ) - // Tags routes ↓ - .service(web::resource("tags") - .route(web::get().to_async(tags::get)) - ) - ); + log::info!("Configuring routes..."); + + app.service(web::resource("/").to(index)) + .service( + web::scope("/api") + // User routes ↓ + .service(web::resource("users").route(web::post().to(users::register))) + .service(web::resource("users/login").route(web::post().to(users::login))) + .service( + web::resource("user") + .route(web::get().to(users::get_current)) + .route(web::put().to(users::update)), + ) + // Profile routes ↓ + .service(web::resource("profiles/{username}").route(web::get().to(profiles::get))) + .service( + web::resource("profiles/{username}/follow") + .route(web::post().to(profiles::follow)) + .route(web::delete().to(profiles::unfollow)), + ) + // Article routes ↓ + .service( + web::resource("articles") + .route(web::get().to(articles::list)) + .route(web::post().to(articles::create)), + ) + .service(web::resource("articles/feed").route(web::get().to(articles::feed))) + .service( + web::resource("articles/{slug}") + .route(web::get().to(articles::get)) + .route(web::put().to(articles::update)) + .route(web::delete().to(articles::delete)), + ) + .service( + web::resource("articles/{slug}/favorite") + .route(web::post().to(articles::favorite)) + .route(web::delete().to(articles::unfavorite)), + ) + .service( + web::resource("articles/{slug}/comments") + .route(web::get().to(articles::comments::list)) + .route(web::post().to(articles::comments::add)), + ) + .service( + web::resource("articles/{slug}/comments/{comment_id}") + .route(web::delete().to(articles::comments::delete)), + ) + // Tags routes ↓ + .service(web::resource("tags").route(web::get().to(tags::get))), + + ); } diff --git a/src/app/profiles.rs b/src/app/profiles.rs index eba579e..3a063ea 100644 --- a/src/app/profiles.rs +++ b/src/app/profiles.rs @@ -1,6 +1,4 @@ use actix_web::{HttpRequest, HttpResponse, web::Path, web::Data}; -use actix_http::error::ResponseError; -use futures::Future; use super::AppState; use crate::prelude::*; @@ -51,62 +49,86 @@ pub struct ProfileResponseInner { // Route handlers ↓ -pub fn get( +pub async fn get( state: Data, (path, req): (Path, HttpRequest), -) -> impl Future { +) -> Result { let db = state.db.clone(); - authenticate(&state, &req) - .then(move |auth| { - db.send(GetProfile { - auth: auth.ok(), - username: path.username.to_owned(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + let auth = authenticate(&state, &req).await?; + let res = db.send(GetProfile { + auth: Some(auth), + username: path.username.to_owned(), + }).await??; + + Ok(HttpResponse::Ok().json(res)) + + // authenticate(&state, &req) + // .then(move |auth| { + // db.send(GetProfile { + // auth: auth.ok(), + // username: path.username.to_owned(), + // }) + // .from_err() + // }) + // .and_then(|res| match res { + // Ok(res) => Ok(HttpResponse::Ok().json(res)), + // Err(e) => Ok(e.error_response()), + // }) } -pub fn follow( +pub async fn follow( state: Data, (path, req): (Path, HttpRequest), -) -> impl Future { +) -> Result { let db = state.db.clone(); - authenticate(&state, &req) - .and_then(move |auth| { - db.send(FollowProfile { - auth, - username: path.username.to_owned(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + let auth = authenticate(&state, &req).await?; + let res = db.send(FollowProfile { + auth, + username: path.username.to_owned(), + }).await??; + + Ok(HttpResponse::Ok().json(res)) + + // authenticate(&state, &req) + // .and_then(move |auth| { + // db.send(FollowProfile { + // auth, + // username: path.username.to_owned(), + // }) + // .from_err() + // }) + // .and_then(|res| match res { + // Ok(res) => Ok(HttpResponse::Ok().json(res)), + // Err(e) => Ok(e.error_response()), + // }) } -pub fn unfollow( +pub async fn unfollow( state: Data, (path, req): (Path, HttpRequest), -) -> impl Future { +) -> Result { let db = state.db.clone(); - authenticate(&state, &req) - .and_then(move |auth| { - db.send(UnfollowProfile { - auth, - username: path.username.to_owned(), - }) - .from_err() - }) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + let auth = authenticate(&state, &req).await?; + let res = db.send(UnfollowProfile { + auth, + username: path.username.to_owned(), + }).await??; + + Ok(HttpResponse::Ok().json(res)) + + // authenticate(&state, &req) + // .and_then(move |auth| { + // db.send(UnfollowProfile { + // auth, + // username: path.username.to_owned(), + // }) + // .from_err() + // }) + // .and_then(|res| match res { + // Ok(res) => Ok(HttpResponse::Ok().json(res)), + // Err(e) => Ok(e.error_response()), + // }) } diff --git a/src/app/tags.rs b/src/app/tags.rs index 378a502..64d046e 100644 --- a/src/app/tags.rs +++ b/src/app/tags.rs @@ -1,5 +1,4 @@ -use actix_web::{HttpResponse, ResponseError, web::Data}; -use futures::Future; +use actix_web::{HttpResponse, web::Data}; use super::AppState; use crate::prelude::*; @@ -18,13 +17,10 @@ pub struct TagsResponse { // Route handlers ↓ -pub fn get(state: Data) -> impl Future { - state +pub async fn get(state: Data) -> Result { + let res = state .db - .send(GetTags {}) - .from_err() - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + .send(GetTags {}).await??; + + Ok(HttpResponse::Ok().json(res)) } diff --git a/src/app/users.rs b/src/app/users.rs index 918c58f..ad74f1c 100644 --- a/src/app/users.rs +++ b/src/app/users.rs @@ -1,5 +1,4 @@ -use actix_web::{HttpRequest, HttpResponse, web::Json, ResponseError, web::Data}; -use futures::{future::result, Future}; +use actix_web::{HttpRequest, HttpResponse, web::Json, web::Data}; use regex::Regex; use std::convert::From; use validator::Validate; @@ -27,8 +26,8 @@ pub struct In { pub struct RegisterUser { #[validate( length( - min = "1", - max = "20", + min = 1, + max = 20, message = "fails validation - must be 1-20 characters long" ), regex( @@ -40,8 +39,8 @@ pub struct RegisterUser { #[validate(email(message = "fails validation - is not a valid email address"))] pub email: String, #[validate(length( - min = "8", - max = "72", + min = 8, + max = 72, message = "fails validation - must be 8-72 characters long" ))] pub password: String, @@ -52,8 +51,8 @@ pub struct LoginUser { #[validate(email(message = "fails validation - is not a valid email address"))] pub email: String, #[validate(length( - min = "8", - max = "72", + min = 8, + max = 72, message = "fails validation - must be 8-72 characters long" ))] pub password: String, @@ -63,8 +62,8 @@ pub struct LoginUser { pub struct UpdateUser { #[validate( length( - min = "1", - max = "20", + min = 1, + max = 20, message = "fails validation - must be 1-20 characters long" ), regex( @@ -76,12 +75,12 @@ pub struct UpdateUser { #[validate(email)] pub email: Option, #[validate(length( - min = "8", - max = "72", + min = 8, + max = 72, message = "fails validation - must be 8-72 characters long" ))] pub password: Option, - #[validate(length(min = "1", message = "fails validation - cannot be empty"))] + #[validate(length(min = 1, message = "fails validation - cannot be empty"))] pub bio: Option, #[validate(url(message = "is not a URL"))] pub image: Option, @@ -139,53 +138,54 @@ impl UserResponse { // Route handlers ↓ -pub fn register( +pub async fn register( (form, state): (Json>, Data), -) -> impl Future { +//) -> impl Future { +) -> Result { let register_user = form.into_inner().user; - result(register_user.validate()) - .from_err() - .and_then(move |_| state.db.send(register_user).from_err()) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + match register_user.validate() { + Ok(()) => { + let res = state.db.send(register_user).await??; + Ok(HttpResponse::Ok().json(res)) + } + Err(err) => Ok(HttpResponse::BadRequest().json(err)) + } } -pub fn login( +pub async fn login( (form, state): (Json>, Data), -) -> impl Future { +) -> Result { let login_user = form.into_inner().user; - result(login_user.validate()) - .from_err() - .and_then(move |_| state.db.send(login_user).from_err()) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + match login_user.validate() { + Ok(()) => { + let res = state.db.send(login_user).await??; + Ok(HttpResponse::Ok().json(res)) + + } + Err(err) => Ok(HttpResponse::BadRequest().json(err)) + } } -pub fn get_current(state: Data, req: HttpRequest) -> impl Future { - authenticate(&state, &req) - .and_then(|auth| Ok(HttpResponse::Ok().json(UserResponse::create_with_auth(auth)))) +pub async fn get_current(state: Data, req: HttpRequest) -> Result { + let auth = authenticate(&state, &req).await?; + + Ok(HttpResponse::Ok().json(UserResponse::create_with_auth(auth))) } -pub fn update( +pub async fn update( state: Data, (form, req): (Json>, HttpRequest), -) -> impl Future { +) -> Result { let update_user = form.into_inner().user; - let db = state.db.clone(); - - result(update_user.validate()) - .from_err() - .and_then(move |_| authenticate(&state, &req)) - .and_then(move |auth| db.send(UpdateUserOuter { auth, update_user }).from_err()) - .and_then(|res| match res { - Ok(res) => Ok(HttpResponse::Ok().json(res)), - Err(e) => Ok(e.error_response()), - }) + match update_user.validate() { + Ok(()) => { + let auth = authenticate(&state, &req).await?; + let res = state.db.send(UpdateUserOuter { auth, update_user }).await??; + Ok(HttpResponse::Ok().json(res)) + } + Err(err) => Ok(HttpResponse::BadRequest().json(err)) + } } diff --git a/src/db/articles.rs b/src/db/articles.rs index f0d33e5..ec9f8e2 100644 --- a/src/db/articles.rs +++ b/src/db/articles.rs @@ -28,7 +28,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: CreateArticleOuter, _: &mut Self::Context) -> Self::Result { use crate::schema::articles; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let author = msg.auth.user; @@ -63,7 +63,7 @@ impl Handler for DbExecutor { type Result = Result; fn handle(&mut self, msg: GetArticle, _: &mut Self::Context) -> Self::Result { - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; match msg.auth { Some(auth) => get_article_response(msg.slug, Some(auth.user.id), conn), @@ -82,7 +82,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: UpdateArticleOuter, _: &mut Self::Context) -> Self::Result { use crate::schema::articles; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let article = articles::table .filter(articles::slug.eq(msg.slug)) @@ -135,7 +135,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: DeleteArticle, _: &mut Self::Context) -> Self::Result { use crate::schema::articles; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let article = articles::table .filter(articles::slug.eq(msg.slug)) @@ -168,7 +168,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: FavoriteArticle, _: &mut Self::Context) -> Self::Result { use crate::schema::{articles, favorite_articles}; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let article = articles::table .filter(articles::slug.eq(msg.slug)) @@ -195,7 +195,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: UnfavoriteArticle, _: &mut Self::Context) -> Self::Result { use crate::schema::{articles, favorite_articles}; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let article = articles::table .filter(articles::slug.eq(msg.slug)) @@ -220,7 +220,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: GetArticles, _: &mut Self::Context) -> Self::Result { use crate::schema::{articles, users}; - let conn = &self.0.get()?; + let conn =&mut self.0.get()?; let mut query = articles::table.into_boxed(); @@ -283,7 +283,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: GetFeed, _: &mut Self::Context) -> Self::Result { use crate::schema::{articles, followers}; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let limit = std::cmp::min(msg.params.limit.unwrap_or(20), 100) as i64; let offset = msg.params.offset.unwrap_or(0) as i64; @@ -316,7 +316,7 @@ fn generate_slug(uuid: &Uuid, title: &str) -> String { fn get_article_response( slug: String, user_id: Option, - conn: &PooledConn, + conn: &mut PooledConn, ) -> Result { use crate::schema::{articles, users}; @@ -358,7 +358,7 @@ fn get_article_response( fn get_article_list_response( articles: Vec
, user_id: Option, - conn: &PooledConn, + conn: &mut PooledConn, ) -> Result { let article_list = articles .iter() @@ -376,7 +376,7 @@ fn get_article_list_response( }) } -fn add_tag(article_id: Uuid, tag_name: T, conn: &PooledConn) -> Result +fn add_tag(article_id: Uuid, tag_name: T, conn: &mut PooledConn) -> Result where T: ToString, { @@ -393,7 +393,7 @@ where .map_err(Into::into) } -fn delete_tags(article_id: Uuid, conn: &PooledConn) -> Result<()> { +fn delete_tags(article_id: Uuid, conn: &mut PooledConn) -> Result<()> { use crate::schema::article_tags; diesel::delete(article_tags::table.filter(article_tags::article_id.eq(article_id))) @@ -401,7 +401,7 @@ fn delete_tags(article_id: Uuid, conn: &PooledConn) -> Result<()> { Ok(()) } -fn delete_favorites(article_id: Uuid, conn: &PooledConn) -> Result<()> { +fn delete_favorites(article_id: Uuid, conn: &mut PooledConn) -> Result<()> { use crate::schema::favorite_articles; diesel::delete(favorite_articles::table.filter(favorite_articles::article_id.eq(article_id))) @@ -409,7 +409,7 @@ fn delete_favorites(article_id: Uuid, conn: &PooledConn) -> Result<()> { Ok(()) } -fn replace_tags(article_id: Uuid, tags: I, conn: &PooledConn) -> Result> +fn replace_tags(article_id: Uuid, tags: I, conn: &mut PooledConn) -> Result> where I: IntoIterator, { @@ -422,7 +422,7 @@ where .collect::>>() } -fn get_favorites_count(article_id: Uuid, conn: &PooledConn) -> Result { +fn get_favorites_count(article_id: Uuid, conn: &mut PooledConn) -> Result { use crate::schema::favorite_articles; let favorites_count = favorite_articles::table @@ -436,7 +436,7 @@ fn get_favorited_and_following( article_id: Uuid, author_id: Uuid, user_id: Uuid, - conn: &PooledConn, + conn: &mut PooledConn, ) -> Result<(bool, bool)> { use crate::schema::{favorite_articles, followers, users}; @@ -463,7 +463,7 @@ fn get_favorited_and_following( Ok((favorite_id.is_some(), follow_id.is_some())) } -fn select_tags_on_article(article_id: Uuid, conn: &PooledConn) -> Result> { +fn select_tags_on_article(article_id: Uuid, conn: &mut PooledConn) -> Result> { use crate::schema::article_tags; let tags = article_tags::table diff --git a/src/db/auth.rs b/src/db/auth.rs index c37f1e9..f130acf 100644 --- a/src/db/auth.rs +++ b/src/db/auth.rs @@ -22,7 +22,7 @@ impl Handler for DbExecutor { let claims = msg.token.decode_jwt()?.claims; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; match users.find(claims.id).first(conn) { Ok(user) => Ok(Auth { diff --git a/src/db/comments.rs b/src/db/comments.rs index bf3252a..2b045c3 100644 --- a/src/db/comments.rs +++ b/src/db/comments.rs @@ -24,7 +24,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: AddCommentOuter, _: &mut Self::Context) -> Self::Result { use crate::schema::{articles, comments}; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let article_id = articles::table .filter(articles::slug.eq(msg.slug)) @@ -57,7 +57,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: GetComments, _: &mut Self::Context) -> Self::Result { use crate::schema::{articles, comments}; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let article_id = articles::table .filter(articles::slug.eq(msg.slug)) @@ -85,7 +85,7 @@ impl Handler for DbExecutor { fn handle(&mut self, msg: DeleteComment, _: &mut Self::Context) -> Self::Result { use crate::schema::comments::dsl::*; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let comment = comments .filter(id.eq(msg.comment_id)) @@ -106,7 +106,7 @@ impl Handler for DbExecutor { fn get_comment_response( comment_id: i32, user_id: Option, - conn: &PooledConn, + conn: &mut PooledConn, ) -> Result { use crate::schema::{comments, followers, users}; @@ -144,7 +144,7 @@ fn get_comment_response( fn get_comment_list_response( comments: Vec, user_id: Option, - conn: &PooledConn, + conn: &mut PooledConn, ) -> Result { let comment_list = comments .iter() diff --git a/src/db/profiles.rs b/src/db/profiles.rs index 69d6d8c..dbd0a10 100644 --- a/src/db/profiles.rs +++ b/src/db/profiles.rs @@ -18,7 +18,7 @@ impl Handler for DbExecutor { type Result = Result; fn handle(&mut self, msg: GetProfile, _: &mut Self::Context) -> Self::Result { - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let user: User = { use crate::schema::users::dsl::*; @@ -56,7 +56,7 @@ impl Handler for DbExecutor { type Result = Result; fn handle(&mut self, msg: FollowProfile, _: &mut Self::Context) -> Self::Result { - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let user_a: User = { use crate::schema::users::dsl::*; @@ -98,7 +98,7 @@ impl Handler for DbExecutor { type Result = Result; fn handle(&mut self, msg: UnfollowProfile, _: &mut Self::Context) -> Self::Result { - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let user_a: User = { use crate::schema::users::dsl::*; diff --git a/src/db/tags.rs b/src/db/tags.rs index a1b7e59..79deb28 100644 --- a/src/db/tags.rs +++ b/src/db/tags.rs @@ -16,7 +16,7 @@ impl Handler for DbExecutor { fn handle(&mut self, _msg: GetTags, _: &mut Self::Context) -> Self::Result { use crate::schema::article_tags::dsl::*; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let tags = article_tags .distinct_on(tag_name) diff --git a/src/db/users.rs b/src/db/users.rs index d5ff8dd..3126dad 100644 --- a/src/db/users.rs +++ b/src/db/users.rs @@ -28,7 +28,7 @@ impl Handler for DbExecutor { image: None, }; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; match diesel::insert_into(users) .values(new_user) @@ -52,13 +52,13 @@ impl Handler for DbExecutor { let provided_password_raw = &msg.password; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let stored_user: User = users.filter(email.eq(msg.email)).first(conn)?; let checker = HashBuilder::from_phc(&stored_user.password)?; if checker.is_valid(provided_password_raw) { - if checker.needs_update(PWD_SCHEME_VERSION) { + if checker.needs_update(Some(PWD_SCHEME_VERSION)) { let new_password = HASHER.hash(provided_password_raw)?; return match diesel::update(users.find(stored_user.id)) .set(password.eq(new_password)) @@ -90,7 +90,7 @@ impl Handler for DbExecutor { let auth = msg.auth; let update_user = msg.update_user; - let conn = &self.0.get()?; + let conn = &mut self.0.get()?; let updated_password = match update_user.password { Some(updated_password) => Some(HASHER.hash(&updated_password)?), diff --git a/src/main.rs b/src/main.rs index 965082e..ded4a49 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,8 +9,7 @@ extern crate lazy_static; extern crate serde_derive; #[macro_use] extern crate serde_json; -#[macro_use] -extern crate validator_derive; + mod app; mod db; @@ -22,7 +21,8 @@ mod utils; use std::env; -fn main() { +#[actix_web::main] +async fn main() -> std::io::Result<()> { dotenv::dotenv().ok(); if env::var("RUST_LOG").ok().is_none() { @@ -30,9 +30,5 @@ fn main() { } env_logger::init(); - let sys = actix::System::new("conduit"); - - app::start(); - - let _ = sys.run(); + app::start().await } diff --git a/src/models/article.rs b/src/models/article.rs index 19301c5..62f56db 100644 --- a/src/models/article.rs +++ b/src/models/article.rs @@ -16,7 +16,7 @@ pub struct Article { } #[derive(Debug, Insertable)] -#[table_name = "articles"] +#[diesel(table_name = articles)] pub struct NewArticle { pub id: Uuid, pub author_id: Uuid, @@ -27,7 +27,7 @@ pub struct NewArticle { } #[derive(Debug, AsChangeset)] -#[table_name = "articles"] +#[diesel(table_name = articles)] pub struct ArticleChange { pub slug: Option, pub title: Option, @@ -36,7 +36,7 @@ pub struct ArticleChange { } #[derive(Debug, Insertable)] -#[table_name = "favorite_articles"] +#[diesel(table_name = favorite_articles)] pub struct NewFavoriteArticle { pub user_id: Uuid, pub article_id: Uuid, diff --git a/src/models/article_tag.rs b/src/models/article_tag.rs index fdd0f33..796b48a 100644 --- a/src/models/article_tag.rs +++ b/src/models/article_tag.rs @@ -4,7 +4,7 @@ use uuid::Uuid; use crate::schema::article_tags; #[derive(Debug, Queryable, Identifiable)] -#[primary_key(article_id, tag_name)] +#[diesel(primary_key(article_id, tag_name))] pub struct ArticleTag { pub article_id: Uuid, pub tag_name: String, @@ -13,7 +13,7 @@ pub struct ArticleTag { } #[derive(Debug, Insertable)] -#[table_name = "article_tags"] +#[diesel(table_name = article_tags)] pub struct NewArticleTag { pub article_id: Uuid, pub tag_name: String, diff --git a/src/models/comment.rs b/src/models/comment.rs index f0d803e..dbe1e22 100644 --- a/src/models/comment.rs +++ b/src/models/comment.rs @@ -14,7 +14,7 @@ pub struct Comment { } #[derive(Debug, Insertable)] -#[table_name = "comments"] +#[diesel(table_name = comments)] pub struct NewComment { pub article_id: Uuid, pub user_id: Uuid, diff --git a/src/models/follower.rs b/src/models/follower.rs index 3ce2727..adcd7dd 100644 --- a/src/models/follower.rs +++ b/src/models/follower.rs @@ -4,7 +4,7 @@ use uuid::Uuid; use crate::schema::followers; #[derive(Debug, Queryable, Identifiable)] -#[primary_key(user_id, follower_id)] +#[diesel(primary_key(user_id, follower_id))] pub struct Follower { pub user_id: Uuid, pub follower_id: Uuid, @@ -13,7 +13,7 @@ pub struct Follower { } #[derive(Debug, Insertable)] -#[table_name = "followers"] +#[diesel(table_name = followers)] pub struct NewFollower { pub user_id: Uuid, pub follower_id: Uuid, diff --git a/src/models/user.rs b/src/models/user.rs index e37d2e4..caa67b3 100644 --- a/src/models/user.rs +++ b/src/models/user.rs @@ -16,7 +16,7 @@ pub struct User { } #[derive(Debug, Insertable)] -#[table_name = "users"] +#[diesel(table_name = users)] pub struct NewUser { pub username: String, pub email: String, @@ -26,7 +26,7 @@ pub struct NewUser { } #[derive(Debug, AsChangeset)] -#[table_name = "users"] +#[diesel(table_name = users)] pub struct UserChange { pub username: Option, pub email: Option, diff --git a/src/utils/auth.rs b/src/utils/auth.rs index 3d4535a..100955b 100644 --- a/src/utils/auth.rs +++ b/src/utils/auth.rs @@ -1,5 +1,7 @@ -use actix_web::{http::header::AUTHORIZATION, HttpRequest, web::Data}; -use futures::{future::result, Future}; +use actix_web::{http::header::AUTHORIZATION, web::Data, HttpRequest}; +//use actix_web::{web, HttpResponse}; +//use futures::TryFutureExt; +//use futures::{future::ready, Future}; use http::header::HeaderValue; use crate::app::AppState; @@ -21,12 +23,15 @@ pub struct GenerateAuth { pub token: String, } -pub fn authenticate(state: &Data, req: &HttpRequest) -> impl Future { +pub async fn authenticate( + state: &Data, + req: &HttpRequest, +) -> Result { let db = state.db.clone(); - result(preprocess_authz_token(req.headers().get(AUTHORIZATION))) - .and_then(move |token| db.send(GenerateAuth { token }).from_err()) - .flatten() + let token = preprocess_authz_token(req.headers().get(AUTHORIZATION))?; + let auth = db.send(GenerateAuth { token }).await??; + Ok(auth) } fn preprocess_authz_token(token: Option<&HeaderValue>) -> Result { diff --git a/src/utils/jwt.rs b/src/utils/jwt.rs index c9868fd..1251e51 100644 --- a/src/utils/jwt.rs +++ b/src/utils/jwt.rs @@ -1,4 +1,5 @@ use chrono::{Duration, Utc}; +use jsonwebtoken::{EncodingKey, DecodingKey}; use jwt::{decode, encode, Header, TokenData, Validation}; use std::env; use uuid::Uuid; @@ -23,7 +24,7 @@ impl CanGenerateJwt for User { let header = Header::default(); let secret = &get_secret(); - let token = encode(&header, &claims, secret.as_ref())?; + let token = encode(&header, &claims, &EncodingKey::from_secret(secret.as_ref()))?; Ok(token) } @@ -35,7 +36,7 @@ pub trait CanDecodeJwt { impl CanDecodeJwt for String { fn decode_jwt(&self) -> Result> { - match decode::(&self, get_secret().as_ref(), &Validation::default()) { + match decode::(&self, &DecodingKey::from_secret(get_secret().as_ref()), &Validation::default()) { Ok(res) => Ok(res), Err(e) => Err(e.into()), } From cc745d9ac0d79ac636b553fc08ca2fb52844fce8 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 12:20:37 -0700 Subject: [PATCH 02/13] Fix default wildcard origin in cors. --- src/app/mod.rs | 2 -- src/app/users.rs | 1 - 2 files changed, 3 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index 2502426..15d9af2 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -43,7 +43,6 @@ pub async fn start() -> std::io::Result<()> { .allowed_headers(vec![AUTHORIZATION, CONTENT_TYPE]) .max_age(3600), None => Cors::default() - .allowed_origin("*") .send_wildcard() .allowed_headers(vec![AUTHORIZATION, CONTENT_TYPE]) .max_age(3600), @@ -112,6 +111,5 @@ fn routes(app: &mut web::ServiceConfig) { ) // Tags routes ↓ .service(web::resource("tags").route(web::get().to(tags::get))), - ); } diff --git a/src/app/users.rs b/src/app/users.rs index ad74f1c..0129fa0 100644 --- a/src/app/users.rs +++ b/src/app/users.rs @@ -162,7 +162,6 @@ pub async fn login( Ok(()) => { let res = state.db.send(login_user).await??; Ok(HttpResponse::Ok().json(res)) - } Err(err) => Ok(HttpResponse::BadRequest().json(err)) } From 717a31f7ee4e916c3eba1f2e4197cac03c0c89f8 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 12:22:09 -0700 Subject: [PATCH 03/13] minor cleanup. --- Cargo.toml | 1 - src/app/mod.rs | 2 -- src/main.rs | 1 - 3 files changed, 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 212fa9c..57d4242 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,4 +31,3 @@ serde_json = "1.0.39" slug = "0.1.4" uuid = { version = "1.2", features = ["serde", "v4"] } validator = { version = "0.16", features = ["derive"] } -#validator_derive = "0.16.0" diff --git a/src/app/mod.rs b/src/app/mod.rs index 15d9af2..72d9caf 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -57,8 +57,6 @@ pub async fn start() -> std::io::Result<()> { .unwrap_or_else(|_| panic!("Could not bind server to address {}", &bind_address)) .run() .await - - //println!("You can access the server at {}", bind_address); } fn routes(app: &mut web::ServiceConfig) { diff --git a/src/main.rs b/src/main.rs index ded4a49..984c704 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,7 +10,6 @@ extern crate serde_derive; #[macro_use] extern crate serde_json; - mod app; mod db; mod error; From f5edfc84d9a5b4c97fdb9190790fbb7d4fd65b85 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 12:29:20 -0700 Subject: [PATCH 04/13] more cleanup. --- src/app/articles/mod.rs | 16 ---------------- src/app/profiles.rs | 39 --------------------------------------- 2 files changed, 55 deletions(-) diff --git a/src/app/articles/mod.rs b/src/app/articles/mod.rs index 7f16e8c..4c90cba 100644 --- a/src/app/articles/mod.rs +++ b/src/app/articles/mod.rs @@ -202,22 +202,6 @@ pub async fn update( } Err(err) => Ok(HttpResponse::BadRequest().json(err)), } - - // result(article.validate()) - // .from_err() - // .and_then(move |_| authenticate(&state, &req)) - // .and_then(move |auth| { - // db.send(UpdateArticleOuter { - // auth, - // slug: path.slug.to_owned(), - // article, - // }) - // .from_err() - // }) - // .and_then(|res| match res { - // Ok(res) => Ok(HttpResponse::Ok().json(res)), - // Err(e) => Ok(e.error_response()), - // }) } pub async fn delete( diff --git a/src/app/profiles.rs b/src/app/profiles.rs index 3a063ea..b588ab6 100644 --- a/src/app/profiles.rs +++ b/src/app/profiles.rs @@ -62,19 +62,6 @@ pub async fn get( }).await??; Ok(HttpResponse::Ok().json(res)) - - // authenticate(&state, &req) - // .then(move |auth| { - // db.send(GetProfile { - // auth: auth.ok(), - // username: path.username.to_owned(), - // }) - // .from_err() - // }) - // .and_then(|res| match res { - // Ok(res) => Ok(HttpResponse::Ok().json(res)), - // Err(e) => Ok(e.error_response()), - // }) } pub async fn follow( @@ -90,19 +77,6 @@ pub async fn follow( }).await??; Ok(HttpResponse::Ok().json(res)) - - // authenticate(&state, &req) - // .and_then(move |auth| { - // db.send(FollowProfile { - // auth, - // username: path.username.to_owned(), - // }) - // .from_err() - // }) - // .and_then(|res| match res { - // Ok(res) => Ok(HttpResponse::Ok().json(res)), - // Err(e) => Ok(e.error_response()), - // }) } pub async fn unfollow( @@ -118,17 +92,4 @@ pub async fn unfollow( }).await??; Ok(HttpResponse::Ok().json(res)) - - // authenticate(&state, &req) - // .and_then(move |auth| { - // db.send(UnfollowProfile { - // auth, - // username: path.username.to_owned(), - // }) - // .from_err() - // }) - // .and_then(|res| match res { - // Ok(res) => Ok(HttpResponse::Ok().json(res)), - // Err(e) => Ok(e.error_response()), - // }) } From 1e3452aafb32ecf03cbba92e478ccf2faf886385 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 12:33:22 -0700 Subject: [PATCH 05/13] Bump rust edition and edit readme. --- Cargo.toml | 4 ++-- README.md | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 57d4242..f8bc75f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "conduit" version = "0.1.0" -authors = ["grey "] -edition = "2018" +authors = ["grey ", "thaddeus ### [Actix](https://actix.rs/) codebase containing real world examples (CRUD, auth, advanced patterns, etc) that adheres to the [RealWorld](https://github.com/gothinkster/realworld) spec and API. -❗ (2021/05/13) This codebase is currently unmaintained, and I am not interested in maintaining it. This relies on an old version of Actix -- developers who want to learn Actix should probably read the latest docs at the [Actix website](https://actix.rs/). - This codebase was created to demonstrate a fully fledged fullstack application built with [Actix](https://actix.rs/) including CRUD operations, authentication, routing, pagination, and more. CORS, however, is not yet added. This implementation is not reviewed. See the [Contributing](#contributing) section below. From 1d1b13eefdaba34707ba4af4d504752ba5187054 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 12:50:25 -0700 Subject: [PATCH 06/13] Ignore vscode. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 793b443..dbe6134 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ # env file .env +.vscode From 4c952ec97a3c0b4e0698767c6de4fc491ff8feb1 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 12:52:26 -0700 Subject: [PATCH 07/13] Removed vscode debug config. --- .gitignore | 2 +- .vscode/launch.json | 45 --------------------------------------------- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.gitignore b/.gitignore index dbe6134..0031b08 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ # env file .env -.vscode +.vscode/ diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 2f88b47..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'conduit'", - "cargo": { - "args": [ - "build", - "--bin=conduit", - "--package=conduit" - ], - "filter": { - "name": "conduit", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'conduit'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=conduit", - "--package=conduit" - ], - "filter": { - "name": "conduit", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - } - ] -} \ No newline at end of file From 87dbee8abe0d0fcc51f1bcf0a2a1383869623729 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 21:25:34 -0700 Subject: [PATCH 08/13] Use ? operator for validate instead of match. --- src/app/articles/comments.rs | 41 ++++++++++------------ src/app/articles/mod.rs | 66 +++++++++++++++++------------------- src/app/profiles.rs | 12 ++----- src/app/users.rs | 41 +++++++++------------- src/utils/auth.rs | 4 +-- 5 files changed, 70 insertions(+), 94 deletions(-) diff --git a/src/app/articles/comments.rs b/src/app/articles/comments.rs index 90da6c8..bdd6e79 100644 --- a/src/app/articles/comments.rs +++ b/src/app/articles/comments.rs @@ -1,4 +1,4 @@ -use actix_web::{HttpRequest, HttpResponse, web::Json, web::Path, web::Data}; +use actix_web::{web::Data, web::Json, web::Path, HttpRequest, HttpResponse}; use validator::Validate; use super::super::AppState; @@ -78,29 +78,22 @@ pub struct CommentListResponse { pub async fn add( state: Data, - (path, form, req): ( - Path, - Json>, - HttpRequest, - ), + (path, form, req): (Path, Json>, HttpRequest), ) -> Result { let comment = form.into_inner().comment; + comment.validate()?; - match comment.validate() { - Ok(()) => { - let auth = authenticate(&state, &req).await?; - let res = state.db - .send(AddCommentOuter { - auth, - slug: path.slug.to_owned(), - comment, - }) - .await??; - - Ok(HttpResponse::Ok().json(res)) - } - Err(err) => Ok(HttpResponse::BadRequest().json(err)), - } + let auth = authenticate(&state, &req).await?; + let res = state + .db + .send(AddCommentOuter { + auth, + slug: path.slug.to_owned(), + comment, + }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } pub async fn list( @@ -108,7 +101,8 @@ pub async fn list( (path, req): (Path, HttpRequest), ) -> Result { let auth = authenticate(&state, &req).await?; - let res = state.db + let res = state + .db .send(GetComments { auth: Some(auth), slug: path.slug.to_owned(), @@ -123,7 +117,8 @@ pub async fn delete( (path, req): (Path, HttpRequest), ) -> Result { let auth = authenticate(&state, &req).await?; - let res = state.db + let res = state + .db .send(DeleteComment { auth, slug: path.slug.to_owned(), diff --git a/src/app/articles/mod.rs b/src/app/articles/mod.rs index 4c90cba..c1d6327 100644 --- a/src/app/articles/mod.rs +++ b/src/app/articles/mod.rs @@ -150,27 +150,24 @@ pub async fn create( (form, req): (Json>, HttpRequest), ) -> Result { let article = form.into_inner().article; - let db = state.db.clone(); + article.validate()?; - match article.validate() { - Ok(()) => { - let auth = authenticate(&state, &req).await?; - let res = db.send(CreateArticleOuter { auth, article }).await??; + let auth = authenticate(&state, &req).await?; + let res = state + .db + .send(CreateArticleOuter { auth, article }) + .await??; - Ok(HttpResponse::Ok().json(res)) - } - Err(err) => Ok(HttpResponse::BadRequest().json(err)), - } + Ok(HttpResponse::Ok().json(res)) } pub async fn get( state: Data, (path, req): (Path, HttpRequest), ) -> Result { - let db = state.db.clone(); - let auth = authenticate(&state, &req).await?; - let res = db + let res = state + .db .send(GetArticle { auth: Some(auth), slug: path.slug.to_owned(), @@ -185,23 +182,19 @@ pub async fn update( (path, form, req): (Path, Json>, HttpRequest), ) -> Result { let article = form.into_inner().article; - let db = state.db.clone(); - - match article.validate() { - Ok(()) => { - let auth = authenticate(&state, &req).await?; - let res = db - .send(UpdateArticleOuter { - auth, - slug: path.slug.to_owned(), - article, - }) - .await??; - - Ok(HttpResponse::Ok().json(res)) - } - Err(err) => Ok(HttpResponse::BadRequest().json(err)), - } + article.validate()?; + + let auth = authenticate(&state, &req).await?; + let res = state + .db + .send(UpdateArticleOuter { + auth, + slug: path.slug.to_owned(), + article, + }) + .await??; + + Ok(HttpResponse::Ok().json(res)) } pub async fn delete( @@ -209,7 +202,8 @@ pub async fn delete( (path, req): (Path, HttpRequest), ) -> Result { let auth = authenticate(&state, &req).await?; - let res = state.db + let res = state + .db .send(DeleteArticle { auth, slug: path.slug.to_owned(), @@ -224,7 +218,8 @@ pub async fn favorite( (path, req): (Path, HttpRequest), ) -> Result { let auth = authenticate(&state, &req).await?; - let res = state.db + let res = state + .db .send(FavoriteArticle { auth, slug: path.slug.to_owned(), @@ -239,7 +234,8 @@ pub async fn unfavorite( (path, req): (Path, HttpRequest), ) -> Result { let auth = authenticate(&state, &req).await?; - let res = state.db + let res = state + .db .send(UnfavoriteArticle { auth, slug: path.slug.to_owned(), @@ -254,7 +250,8 @@ pub async fn list( (req, params): (HttpRequest, Query), ) -> Result { let auth = authenticate(&state, &req).await?; - let res = state.db + let res = state + .db .send(GetArticles { auth: Some(auth), params: params.into_inner(), @@ -269,7 +266,8 @@ pub async fn feed( (req, params): (HttpRequest, Query), ) -> Result { let auth = authenticate(&state, &req).await?; - let res = state.db + let res = state + .db .send(GetFeed { auth, params: params.into_inner(), diff --git a/src/app/profiles.rs b/src/app/profiles.rs index b588ab6..ab09f63 100644 --- a/src/app/profiles.rs +++ b/src/app/profiles.rs @@ -53,10 +53,8 @@ pub async fn get( state: Data, (path, req): (Path, HttpRequest), ) -> Result { - let db = state.db.clone(); - let auth = authenticate(&state, &req).await?; - let res = db.send(GetProfile { + let res = state.db.send(GetProfile { auth: Some(auth), username: path.username.to_owned(), }).await??; @@ -68,10 +66,8 @@ pub async fn follow( state: Data, (path, req): (Path, HttpRequest), ) -> Result { - let db = state.db.clone(); - let auth = authenticate(&state, &req).await?; - let res = db.send(FollowProfile { + let res = state.db.send(FollowProfile { auth, username: path.username.to_owned(), }).await??; @@ -83,10 +79,8 @@ pub async fn unfollow( state: Data, (path, req): (Path, HttpRequest), ) -> Result { - let db = state.db.clone(); - let auth = authenticate(&state, &req).await?; - let res = db.send(UnfollowProfile { + let res = state.db.send(UnfollowProfile { auth, username: path.username.to_owned(), }).await??; diff --git a/src/app/users.rs b/src/app/users.rs index 0129fa0..0124bf8 100644 --- a/src/app/users.rs +++ b/src/app/users.rs @@ -1,4 +1,4 @@ -use actix_web::{HttpRequest, HttpResponse, web::Json, web::Data}; +use actix_web::{web::Data, web::Json, HttpRequest, HttpResponse}; use regex::Regex; use std::convert::From; use validator::Validate; @@ -140,17 +140,12 @@ impl UserResponse { pub async fn register( (form, state): (Json>, Data), -//) -> impl Future { ) -> Result { let register_user = form.into_inner().user; - match register_user.validate() { - Ok(()) => { - let res = state.db.send(register_user).await??; - Ok(HttpResponse::Ok().json(res)) - } - Err(err) => Ok(HttpResponse::BadRequest().json(err)) - } + register_user.validate()?; + let res = state.db.send(register_user).await??; + Ok(HttpResponse::Ok().json(res)) } pub async fn login( @@ -158,16 +153,12 @@ pub async fn login( ) -> Result { let login_user = form.into_inner().user; - match login_user.validate() { - Ok(()) => { - let res = state.db.send(login_user).await??; - Ok(HttpResponse::Ok().json(res)) - } - Err(err) => Ok(HttpResponse::BadRequest().json(err)) - } + login_user.validate()?; + let res = state.db.send(login_user).await??; + Ok(HttpResponse::Ok().json(res)) } -pub async fn get_current(state: Data, req: HttpRequest) -> Result { +pub async fn get_current(state: Data, req: HttpRequest) -> Result { let auth = authenticate(&state, &req).await?; Ok(HttpResponse::Ok().json(UserResponse::create_with_auth(auth))) @@ -179,12 +170,12 @@ pub async fn update( ) -> Result { let update_user = form.into_inner().user; - match update_user.validate() { - Ok(()) => { - let auth = authenticate(&state, &req).await?; - let res = state.db.send(UpdateUserOuter { auth, update_user }).await??; - Ok(HttpResponse::Ok().json(res)) - } - Err(err) => Ok(HttpResponse::BadRequest().json(err)) - } + update_user.validate()?; + + let auth = authenticate(&state, &req).await?; + let res = state + .db + .send(UpdateUserOuter { auth, update_user }) + .await??; + Ok(HttpResponse::Ok().json(res)) } diff --git a/src/utils/auth.rs b/src/utils/auth.rs index 100955b..bbd5946 100644 --- a/src/utils/auth.rs +++ b/src/utils/auth.rs @@ -27,10 +27,8 @@ pub async fn authenticate( state: &Data, req: &HttpRequest, ) -> Result { - let db = state.db.clone(); - let token = preprocess_authz_token(req.headers().get(AUTHORIZATION))?; - let auth = db.send(GenerateAuth { token }).await??; + let auth = state.db.send(GenerateAuth { token }).await??; Ok(auth) } From 4136175266ae85c2a07175af11b24e5fde12971d Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 21:32:48 -0700 Subject: [PATCH 09/13] Cleanup. --- src/app/users.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/users.rs b/src/app/users.rs index 0124bf8..fbc0ef3 100644 --- a/src/app/users.rs +++ b/src/app/users.rs @@ -142,8 +142,8 @@ pub async fn register( (form, state): (Json>, Data), ) -> Result { let register_user = form.into_inner().user; - register_user.validate()?; + let res = state.db.send(register_user).await??; Ok(HttpResponse::Ok().json(res)) } @@ -152,16 +152,16 @@ pub async fn login( (form, state): (Json>, Data), ) -> Result { let login_user = form.into_inner().user; - login_user.validate()?; + let res = state.db.send(login_user).await??; Ok(HttpResponse::Ok().json(res)) } pub async fn get_current(state: Data, req: HttpRequest) -> Result { - let auth = authenticate(&state, &req).await?; - - Ok(HttpResponse::Ok().json(UserResponse::create_with_auth(auth))) + authenticate(&state, &req) + .await + .and_then(|auth| Ok(HttpResponse::Ok().json(UserResponse::create_with_auth(auth)))) } pub async fn update( @@ -169,7 +169,6 @@ pub async fn update( (form, req): (Json>, HttpRequest), ) -> Result { let update_user = form.into_inner().user; - update_user.validate()?; let auth = authenticate(&state, &req).await?; From c410b75673b989369ca1542c5ce020f95c341b0f Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 11 Nov 2022 21:55:14 -0700 Subject: [PATCH 10/13] cleanup --- src/utils/auth.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/utils/auth.rs b/src/utils/auth.rs index bbd5946..a4569ed 100644 --- a/src/utils/auth.rs +++ b/src/utils/auth.rs @@ -1,7 +1,4 @@ use actix_web::{http::header::AUTHORIZATION, web::Data, HttpRequest}; -//use actix_web::{web, HttpResponse}; -//use futures::TryFutureExt; -//use futures::{future::ready, Future}; use http::header::HeaderValue; use crate::app::AppState; From d212efd57cf5c348babb48d52451d939672bfcc2 Mon Sep 17 00:00:00 2001 From: flo Date: Sat, 12 Nov 2022 09:44:53 -0700 Subject: [PATCH 11/13] The app::start function should be actix-web main. --- src/app/mod.rs | 4 ++-- src/main.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index 72d9caf..1f64a07 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -23,6 +23,7 @@ async fn index(_state: Data, _req: HttpRequest) -> &'static str { "Hello world!" } +#[actix_web::main] pub async fn start() -> std::io::Result<()> { let frontend_origin = env::var("FRONTEND_ORIGIN").ok(); @@ -53,8 +54,7 @@ pub async fn start() -> std::io::Result<()> { .wrap(cors) .configure(routes) }) - .bind(&bind_address) - .unwrap_or_else(|_| panic!("Could not bind server to address {}", &bind_address)) + .bind(&bind_address)? .run() .await } diff --git a/src/main.rs b/src/main.rs index 984c704..3cf7e10 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,5 @@ +#![allow(unused_must_use)] + #[macro_use] extern crate diesel; #[macro_use] @@ -20,14 +22,12 @@ mod utils; use std::env; -#[actix_web::main] -async fn main() -> std::io::Result<()> { +fn main() { dotenv::dotenv().ok(); if env::var("RUST_LOG").ok().is_none() { env::set_var("RUST_LOG", "conduit=debug,actix_web=info"); } env_logger::init(); - - app::start().await + app::start(); } From c70906955cdcc784ece00c4cd1f67d1e4861c52c Mon Sep 17 00:00:00 2001 From: flo Date: Sat, 12 Nov 2022 11:34:15 -0700 Subject: [PATCH 12/13] Article list should be accessible without a auth token. --- src/app/articles/mod.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/articles/mod.rs b/src/app/articles/mod.rs index c1d6327..6c194c0 100644 --- a/src/app/articles/mod.rs +++ b/src/app/articles/mod.rs @@ -249,11 +249,15 @@ pub async fn list( state: Data, (req, params): (HttpRequest, Query), ) -> Result { - let auth = authenticate(&state, &req).await?; + let auth = authenticate(&state, &req) + .await + .map(|auth| Some(auth)) + .unwrap_or(None); + let res = state .db .send(GetArticles { - auth: Some(auth), + auth, params: params.into_inner(), }) .await??; From 67be067cf289cdfb95291ad0434627b5f60a98a4 Mon Sep 17 00:00:00 2001 From: flo Date: Sat, 12 Nov 2022 11:44:03 -0700 Subject: [PATCH 13/13] Routes that can be publicly accessible without auth. --- src/app/articles/comments.rs | 8 +++++-- src/app/articles/mod.rs | 8 +++++-- src/app/profiles.rs | 41 ++++++++++++++++++++++++------------ 3 files changed, 39 insertions(+), 18 deletions(-) diff --git a/src/app/articles/comments.rs b/src/app/articles/comments.rs index bdd6e79..2249d2e 100644 --- a/src/app/articles/comments.rs +++ b/src/app/articles/comments.rs @@ -100,11 +100,15 @@ pub async fn list( state: Data, (path, req): (Path, HttpRequest), ) -> Result { - let auth = authenticate(&state, &req).await?; + let auth = authenticate(&state, &req) + .await + .map(|auth| Some(auth)) + .unwrap_or(None); + let res = state .db .send(GetComments { - auth: Some(auth), + auth, slug: path.slug.to_owned(), }) .await??; diff --git a/src/app/articles/mod.rs b/src/app/articles/mod.rs index 6c194c0..89f63d8 100644 --- a/src/app/articles/mod.rs +++ b/src/app/articles/mod.rs @@ -165,11 +165,15 @@ pub async fn get( state: Data, (path, req): (Path, HttpRequest), ) -> Result { - let auth = authenticate(&state, &req).await?; + let auth = authenticate(&state, &req) + .await + .map(|auth| Some(auth)) + .unwrap_or(None); + let res = state .db .send(GetArticle { - auth: Some(auth), + auth, slug: path.slug.to_owned(), }) .await??; diff --git a/src/app/profiles.rs b/src/app/profiles.rs index ab09f63..3cb19ab 100644 --- a/src/app/profiles.rs +++ b/src/app/profiles.rs @@ -1,4 +1,4 @@ -use actix_web::{HttpRequest, HttpResponse, web::Path, web::Data}; +use actix_web::{web::Data, web::Path, HttpRequest, HttpResponse}; use super::AppState; use crate::prelude::*; @@ -53,11 +53,18 @@ pub async fn get( state: Data, (path, req): (Path, HttpRequest), ) -> Result { - let auth = authenticate(&state, &req).await?; - let res = state.db.send(GetProfile { - auth: Some(auth), - username: path.username.to_owned(), - }).await??; + let auth = authenticate(&state, &req) + .await + .map(|auth| Some(auth)) + .unwrap_or(None); + + let res = state + .db + .send(GetProfile { + auth, + username: path.username.to_owned(), + }) + .await??; Ok(HttpResponse::Ok().json(res)) } @@ -67,10 +74,13 @@ pub async fn follow( (path, req): (Path, HttpRequest), ) -> Result { let auth = authenticate(&state, &req).await?; - let res = state.db.send(FollowProfile { - auth, - username: path.username.to_owned(), - }).await??; + let res = state + .db + .send(FollowProfile { + auth, + username: path.username.to_owned(), + }) + .await??; Ok(HttpResponse::Ok().json(res)) } @@ -80,10 +90,13 @@ pub async fn unfollow( (path, req): (Path, HttpRequest), ) -> Result { let auth = authenticate(&state, &req).await?; - let res = state.db.send(UnfollowProfile { - auth, - username: path.username.to_owned(), - }).await??; + let res = state + .db + .send(UnfollowProfile { + auth, + username: path.username.to_owned(), + }) + .await??; Ok(HttpResponse::Ok().json(res)) }