From a79434a9e721f639bdda339bc601dc152451a1bb Mon Sep 17 00:00:00 2001 From: Donovan Preston Date: Fri, 21 Feb 2020 13:56:39 -0500 Subject: [PATCH] chore: Update to actix-web 2.0. Fix #394. Update the code to actix-web 2.0, but do not use async await syntax except where it made the changes significantly easier. async await syntax will be coming in a series of new pull requests. --- Cargo.lock | 714 ++++++++++++++----------- Cargo.toml | 16 +- db-tests/Cargo.lock | 788 ++++++++++++++++----------- db-tests/src/batch.rs | 53 +- db-tests/src/db_tests.rs | 195 +++---- db-tests/src/support.rs | 2 +- src/db/mock.rs | 10 +- src/db/mod.rs | 18 +- src/db/mysql/models.rs | 54 +- src/db/mysql/pool.rs | 33 +- src/db/spanner/models.rs | 58 +- src/db/spanner/pool.rs | 26 +- src/db/spanner/support.rs | 28 +- src/error.rs | 18 +- src/main.rs | 7 +- src/server/metrics.rs | 8 +- src/server/mod.rs | 60 +-- src/server/test.rs | 127 +++-- src/web/auth.rs | 2 +- src/web/extractors.rs | 819 +++++++++++++++-------------- src/web/handlers.rs | 279 ++++++---- src/web/middleware/db.rs | 37 +- src/web/middleware/precondition.rs | 52 +- src/web/middleware/sentry.rs | 26 +- src/web/middleware/weave.rs | 29 +- src/web/tags.rs | 6 +- 26 files changed, 1865 insertions(+), 1600 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6b872d1369..9bfd8060ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,72 +2,75 @@ # It is not intended for manual editing. [[package]] name = "actix-codec" -version = "0.1.2" +version = "0.2.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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-connect" -version = "0.2.5" +version = "1.0.1" 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-rt 0.2.6 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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)", + "trust-dns-proto 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-resolver 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-cors" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web 1.0.9 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-http" -version = "0.2.11" +version = "1.0.1" 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.7 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-connect 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-threadpool 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.2.1 (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)", + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.10 (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)", + "derive_more 0.99.2 (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.22 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -75,6 +78,7 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", @@ -83,149 +87,155 @@ dependencies = [ "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.12 (registry+https://github.com/rust-lang/crates.io-index)", - "trust-dns-resolver 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "actix-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-router" -version = "0.1.5" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)", + "bytestring 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-rt" -version = "0.2.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-threadpool 0.3.1 (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.29 (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.9 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-server" -version = "0.6.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "actix-rt 0.2.6 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (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.11.1 (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.11 (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.12 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "actix-server-config" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.29 (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)", ] [[package]] name = "actix-service" -version = "0.4.2" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-testing" -version = "0.1.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "actix-rt 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server 0.6.1 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-threadpool" -version = "0.1.2" +version = "0.3.1" 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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "actix-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "actix-utils" -version = "0.4.7" +version = "1.0.6" 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-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)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.3 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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.12 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 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)", ] [[package]] name = "actix-web" -version = "1.0.9" -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.11 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server 0.6.1 (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-testing 0.1.0 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web-codegen 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "awc 0.2.8 (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)", +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-router 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-testing 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-threadpool 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web-codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "awc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "encoding_rs 0.8.22 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.14 (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)", + "pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (registry+https://github.com/rust-lang/crates.io-index)", @@ -236,7 +246,7 @@ dependencies = [ [[package]] name = "actix-web-codegen" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -249,14 +259,6 @@ name = "adler32" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "ahash" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "aho-corasick" version = "0.7.6" @@ -280,6 +282,16 @@ name = "arrayvec" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "async-trait" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "atty" version = "0.2.13" @@ -296,16 +308,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "awc" -version = "0.2.8" +version = "1.0.1" 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.11 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -313,7 +326,6 @@ dependencies = [ "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.44 (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.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -439,6 +451,19 @@ dependencies = [ "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bytes" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bytestring" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "c2-chacha" version = "0.2.3" @@ -525,24 +550,6 @@ dependencies = [ "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "const-random" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "const-random-macro" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "constant_time_eq" version = "0.1.4" @@ -738,26 +745,12 @@ dependencies = [ [[package]] name = "derive_more" -version = "0.14.1" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (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.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "derive_more" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.4.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.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (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.44 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -859,12 +852,13 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -940,7 +934,6 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.66 (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 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -986,6 +979,34 @@ name = "futures" version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-channel 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-executor 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-channel" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "futures-cpupool" version = "0.1.8" @@ -995,6 +1016,69 @@ dependencies = [ "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "futures-executor" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-io" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-macro" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-sink" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-task" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-util" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-macro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "generic-array" version = "0.12.3" @@ -1070,12 +1154,21 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.6.3" +name = "h2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1091,6 +1184,14 @@ dependencies = [ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hermit-abi" version = "0.1.5" @@ -1136,6 +1237,16 @@ dependencies = [ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "http" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.3 (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)", +] + [[package]] name = "http-body" version = "0.1.0" @@ -1432,15 +1543,6 @@ dependencies = [ "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "miniz-sys" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "miniz_oxide" version = "0.3.5" @@ -1702,6 +1804,34 @@ name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "pin-project" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "pin-utils" +version = "0.1.0-alpha.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pkg-config" version = "0.3.17" @@ -1723,12 +1853,9 @@ dependencies = [ ] [[package]] -name = "proc-macro2" -version = "0.4.30" +name = "proc-macro-nested" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] name = "proc-macro2" @@ -1760,14 +1887,6 @@ name = "quick-error" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "quote" version = "1.0.2" @@ -2266,15 +2385,6 @@ name = "shlex" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "signal-hook" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "signal-hook-registry" version = "1.2.0" @@ -2420,16 +2530,6 @@ name = "subtle" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "syn" version = "1.0.11" @@ -2444,13 +2544,12 @@ dependencies = [ name = "syncstorage" version = "0.2.2" dependencies = [ - "actix-cors 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-http 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-rt 0.2.6 (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.9 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-cors 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "cadence 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "config 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2460,7 +2559,7 @@ dependencies = [ "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "googleapis-raw 0.0.1", "grpcio 0.5.0-alpha.5 (registry+https://github.com/rust-lang/crates.io-index)", "hawk 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2491,7 +2590,7 @@ dependencies = [ "slog-stdlog 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-term 2.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-threadpool 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "validator 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2590,23 +2689,33 @@ dependencies = [ ] [[package]] -name = "tokio-buf" -version = "0.1.1" +name = "tokio" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-codec" +name = "tokio-buf" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2655,22 +2764,6 @@ dependencies = [ "tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "tokio-signal" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (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.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.9 (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.11 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "tokio-sync" version = "0.1.7" @@ -2721,17 +2814,16 @@ dependencies = [ ] [[package]] -name = "tokio-udp" -version = "0.1.5" +name = "tokio-util" +version = "0.2.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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.21 (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.11 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2744,44 +2836,39 @@ dependencies = [ [[package]] name = "trust-dns-proto" -version = "0.7.4" +version = "0.18.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "async-trait 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)", + "enum-as-inner 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.9 (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.11 (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.12 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-udp 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "trust-dns-resolver" -version = "0.11.1" +version = "0.18.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.1 (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.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.9 (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 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-proto 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2835,8 +2922,8 @@ dependencies = [ ] [[package]] -name = "unicode-xid" -version = "0.1.0" +name = "unicode-segmentation" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -3058,29 +3145,30 @@ dependencies = [ ] [metadata] -"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.11 (registry+https://github.com/rust-lang/crates.io-index)" = "fcb50f77cd28240d344fd54afd205bae8760a3b0ad448b1716a2aa31e24db139" -"checksum actix-router 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "23224bb527e204261d0291102cb9b52713084def67d94f7874923baefe04ccf7" -"checksum actix-rt 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "88c9da1d06603d82ec2b6690fc5b80eb626cd2d6b573f3d9a71d5252e06d098e" -"checksum actix-server 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dd626534af8d0a738e5f74901fe603af0445708f91b86a7d763d80df10d562a5" -"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-testing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af001e97ac6750994824d400a1b7087055aab14317aa012f528d0b2b363f37f1" -"checksum actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b5ae85d13da7e6fb86b1b7bc83185e0e3bd4cc5f421c887e1803796c034d35d" -"checksum actix-utils 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "908c3109948f5c37a8b57fd343a37dcad5bb1d90bfd06300ac96b17bbe017b95" -"checksum actix-web 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "af3a1b967cdbacb903c4b9ae71257a7f098d881b25eb483d0c468b7dac579b03" -"checksum actix-web-codegen 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "068a33520e21c1eea89726be4d6b3ce2e6b81046904367e1677287695a043abb" +"checksum actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09e55f0a5c2ca15795035d90c46bd0e73a5123b72f68f12596d6ba5282051380" +"checksum actix-connect 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1f2b61480a8d30c94d5c883d79ef026b02ad6809931b0a4bb703f9545cd8c986" +"checksum actix-cors 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6206917d5c0fdd79d81cec9ef02d3e802df4abf276d96241e1f595d971e002" +"checksum actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c16664cc4fdea8030837ad5a845eb231fb93fc3c5c171edfefb52fad92ce9019" +"checksum actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "21705adc76bbe4bc98434890e73a89cd00c6015e5704a60bb6eea6c3b72316b6" +"checksum actix-router 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d7a10ca4d94e8c8e7a87c5173aba1b97ba9a6563ca02b0e1cd23531093d3ec8" +"checksum actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6a0a55507046441a496b2f0d26a84a65e67c8cafffe279072412f624b5fb6d" +"checksum actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51d3455eaac03ca3e49d7b822eb35c884b861f715627254ccbe4309d08f1841a" +"checksum actix-service 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9fba4171f1952aa15f3cf410facac388d18110b1e8754f84a407ab7f9d5ac7ee" +"checksum actix-testing 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48494745b72d0ea8ff0cf874aaf9b622a3ee03d7081ee0c04edea4f26d32c911" +"checksum actix-threadpool 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf4082192601de5f303013709ff84d81ca6a1bc4af7fb24f367a500a23c6e84e" +"checksum actix-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4e5b4faaf105e9a6d389c606c298dcdb033061b00d532af9df56ff3a54995a8" +"checksum actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fcf8f5631bf01adec2267808f00e228b761c60c0584cc9fa0b5364f41d147f4e" +"checksum actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3158e822461040822f0dbf1735b9c2ce1f95f93b651d7a7aded00b1efbb1f635" +"checksum actix-web-codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de0878b30e62623770a4713a6338329fd0119703bafc211d3e4144f4d4a7bdd5" "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" -"checksum ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3" "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" "checksum arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" "checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +"checksum async-trait 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "c8df72488e87761e772f14ae0c2480396810e51b2c2ade912f97f0f7e5b95e3c" "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum awc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "5e995283278dd3bf0449e7534e77184adb1570c0de8b6a50bf7c9d01ad8db8c4" +"checksum awc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d7601d4d1d7ef2335d6597a41b5fe069f6ab799b85f53565ab390e7b7065aac5" "checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea" "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" @@ -3095,6 +3183,8 @@ dependencies = [ "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum bytes 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10004c15deb332055f7a4a208190aed362cf9a7c2f6ab70a305fba50e1105f38" +"checksum bytestring 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b24c107a4432e408d2caa58d3f5e763b219236221406ea58a4076b62343a039d" "checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" "checksum cadence 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4cc8802110b3a8650896ab9ab0578b5b3057a112ccb0832b5c2ffebfccacc0db" "checksum cc 1.0.48 (registry+https://github.com/rust-lang/crates.io-index)" = "f52a465a666ca3d838ebbf08b241383421412fe7ebb463527bba275526d89f76" @@ -3105,8 +3195,6 @@ dependencies = [ "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" "checksum config 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f9107d78ed62b3fa5a86e7d18e647abed48cfd8f8fab6c72f4cdb982d196f7e6" -"checksum const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7b641a8c9867e341f3295564203b1c250eb8ce6cb6126e007941f78c4d2ed7fe" -"checksum const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c750ec12b83377637110d5a57f5ae08e895b06c4b16e2bdbf1a94ef717428c59" "checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120" "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" "checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" @@ -3127,8 +3215,7 @@ dependencies = [ "checksum curl 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "06aa71e9208a54def20792d877bc663d6aae0732b9852e612c4a933177c31283" "checksum curl-sys 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "f659f3ffac9582d6177bb86d1d2aa649f4eb9d0d4de9d03ccc08b402832ea340" "checksum debugid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "088c9627adec1e494ff9dea77377f1e69893023d631254a0ec68b16ee20be3e9" -"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 derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8" "checksum diesel 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d7cc03b910de9935007861dce440881f69102aaaedfd4bc5a6f40340ca5840c" "checksum diesel_derives 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" "checksum diesel_logger 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d73a791d0f0fff4bc6244bd8b70776a45b1140716411efe1364be9a868cbea7" @@ -3140,7 +3227,7 @@ dependencies = [ "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.22 (registry+https://github.com/rust-lang/crates.io-index)" = "cd8d03faa7fe0c1431609dfad7bbe827af30f82e1e2ae6f7ee4fca6bd764bc28" -"checksum enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3d58266c97445680766be408285e798d3401c6d4c378ec5552e78737e681e37d" +"checksum enum-as-inner 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "900a6c7fbe523f4c2884eaf26b57b81bb69b6810a01a236390a7ac021d09492e" "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" @@ -3156,20 +3243,32 @@ dependencies = [ "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.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" +"checksum futures 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b6f16056ecbb57525ff698bb955162d0cd03bee84e6241c27ff75c08d8ca5987" +"checksum futures-channel 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fcae98ca17d102fd8a3603727b9259fcf7fa4239b603d2142926189bc8999b86" +"checksum futures-core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "79564c427afefab1dfb3298535b21eda083ef7935b4f0ecbfcb121f0aec10866" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum futures-executor 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1e274736563f686a837a0568b478bdabfeaec2dca794b5649b04e2fe1627c231" +"checksum futures-io 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e676577d229e70952ab25f3945795ba5b16d63ca794ca9d2c860e5595d20b5ff" +"checksum futures-macro 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "52e7c56c15537adb4f76d0b7a76ad131cb4d2f4f32d3b0bcabcbe1c7c5e87764" +"checksum futures-sink 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "171be33efae63c2d59e6dbba34186fe0d6394fb378069a76dfd80fdcffd43c16" +"checksum futures-task 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0bae52d6b29cf440e298856fec3965ee6fa71b06aa7495178615953fd669e5f9" +"checksum futures-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c0d66274fb76985d3c62c886d1da7ac4c0903a8c9f754e8fe0f35a6a6cc39e76" +"checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum grpcio 0.5.0-alpha.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1463096cfc371772d59a48fbfc471e18892e197efc5867b3bd7c2e0428e97824" "checksum grpcio-sys 0.5.0-alpha.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c8aebf59fdf3668edf163c1948ceca64c4ebb733d71c9055a12219d336bd5d51" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -"checksum hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" +"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" "checksum hawk 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7afdba594720e9250e3d3609ec309f8adb26fa18ce39834aeb6724a30bc2431c" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f629dc602392d3ec14bfc8a09b5e644d7ffd725102b48b81e59f90f2633621d7" "checksum hkdf 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3fa08a006102488bd9cd5b8013aabe84955cf5ae22e304c2caf655b633aefae3" "checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" "checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" "checksum http 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" +"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" @@ -3206,7 +3305,6 @@ dependencies = [ "checksum migrations_macros 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "719ef0bc7f531428764c9b70661c14abd50a7f3d21f355752d9985aa21251c9e" "checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" -"checksum miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" "checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" "checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" "checksum mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "966257a94e196b11bb43aca423754d87429960a768de9414f3691d6957abf125" @@ -3234,15 +3332,18 @@ dependencies = [ "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "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 pin-project 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "94b90146c7216e4cb534069fb91366de4ea0ea353105ee45ed297e2d1619e469" +"checksum pin-project-internal 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "44ca92f893f0656d3cba8158dd0f2b99b94de256a4a54e870bd6922fcc6c8355" +"checksum pin-project-lite 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e8822eb8bb72452f038ebf6048efa02c3fe22bf83f76519c9583e47fc194a422" +"checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" "checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" "checksum protobuf 2.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f00e4a3cb64ecfeac2c0a73c74c68ae3439d7a6bead3870be56ad5dd2620a6f" "checksum publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3bbaa49075179162b49acac1c6aa45fb4dafb5f13cf6794276d77bc7fd95757b" "checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" "checksum quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" "checksum r2d2 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1497e40855348e4a8a40767d8e55174bce1e445a3ac9254ad44ad468ee0485af" "checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" @@ -3296,7 +3397,6 @@ dependencies = [ "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" "checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" -"checksum signal-hook 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "7a9c17dd3ba2d36023a5c9472ecddeda07e27fd0b05436e8c1e0c8f178185652" "checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" "checksum sized-chunks 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3e7f23bad2d6694e0f46f5e470ec27eb07b8f3e8b309a4b0dc17501928b9f2" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" @@ -3314,7 +3414,6 @@ dependencies = [ "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" "checksum strsim 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" "checksum subtle 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" -"checksum syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)" = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" "checksum syn 1.0.11 (registry+https://github.com/rust-lang/crates.io-index)" = "dff0acdb207ae2fe6d5976617f887eb1e35a2ba52c13c7234c790960cdad9238" "checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" "checksum take_mut 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f764005d11ee5f36500a149ace24e00e3da98b0158b3e2d53a7495660d3f4d60" @@ -3325,21 +3424,20 @@ dependencies = [ "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 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +"checksum tokio 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa2fdcfa937b20cb3c822a635ceecd5fc1a27a6a474527e5516aa24b8c8820a" "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -"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.9 (registry+https://github.com/rust-lang/crates.io-index)" = "ca6df436c42b0c3330a82d855d2ef017cd793090ad550a6bc2184f4b933532ab" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" "checksum tokio-reactor 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6732fe6b53c8d11178dcb77ac6d9682af27fc6d4cb87789449152e5377377146" -"checksum tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6dc5276ea05ce379a16de90083ec80836440d5ef8a6a39545a3207373b8296" "checksum tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" "checksum tokio-threadpool 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c32ffea4827978e9aa392d2f743d973c1dfa3730a2ed3f22ce1e6984da848c" "checksum tokio-timer 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1739638e364e558128461fc1ad84d997702c8e31c2e6b18fb99842268199e827" -"checksum tokio-udp 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f02298505547f73e60f568359ef0d016d5acd6e830ab9bc7c4a5b3403440121b" +"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -"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 trust-dns-proto 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2a7f3a2ab8a919f5eca52a468866a67ed7d3efa265d48a652a9a3452272b413f" +"checksum trust-dns-resolver 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6f90b1502b226f8b2514c6d5b37bafa8c200d7ca4102d57dc36ee0f3b7a04a2f" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" "checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" @@ -3347,7 +3445,7 @@ dependencies = [ "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b561e267b2326bb4cebfc0ef9e68355c7abe6c6f522aeac2f5bf95d56c59bdcf" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "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" diff --git a/Cargo.toml b/Cargo.toml index d2ba11320f..a6274bebc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,12 @@ edition = "2018" debug = 1 [dependencies] -actix-web = "^1.0.7" -actix-rt = "0.2" -actix-cors = "0.1" -actix-http = "0.2" -actix-service = "0.4" +actix-http = "1" +actix-web = "2" +actix-rt = "1" +actix-cors = "0.2" base64 = "0.11.0" -bytes = "0.4" +bytes = "0.5" cadence = "0.19.1" chrono = "0.4" config = "0.9.3" @@ -29,8 +28,7 @@ diesel_migrations = { version = "1.4.0", features = ["mysql"] } docopt = "1.1.0" env_logger = "0.7.1" failure = "0.1.6" -# do not upgrade futures! -futures = "0.1.28" +futures = { version = "0.3", features = ["compat"] } googleapis-raw = { version = "0", path = "../mozilla-rust-sdk/googleapis-raw" } grpcio = { version = "0.5.0-alpha.5" } lazy_static = "1.4.0" @@ -62,7 +60,7 @@ slog-scope = "4.3" slog-stdlog = "4.0" slog-term = "2.4" time = "0.1.42" -tokio-threadpool = "0.1.16" +tokio = "0.2.9" url = "2.1.0" uuid = { version = "0.8.1", features = ["serde", "v4"] } validator = "0.10" diff --git a/db-tests/Cargo.lock b/db-tests/Cargo.lock index 10ef2f6308..d42b13cc68 100644 --- a/db-tests/Cargo.lock +++ b/db-tests/Cargo.lock @@ -2,72 +2,75 @@ # It is not intended for manual editing. [[package]] name = "actix-codec" -version = "0.1.2" +version = "0.2.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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-connect" -version = "0.2.5" +version = "1.0.2" 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-rt 0.2.6 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", - "derive_more 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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)", + "trust-dns-proto 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-resolver 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-cors" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "actix-service 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web 1.0.9 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-http" -version = "0.2.11" +version = "1.0.1" 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.7 (registry+https://github.com/rust-lang/crates.io-index)", - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-connect 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-threadpool 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "bitflags 1.2.1 (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)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.9 (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)", + "derive_more 0.99.2 (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.20 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.13 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -75,159 +78,166 @@ dependencies = [ "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (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)", +] + +[[package]] +name = "actix-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-router" -version = "0.1.5" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)", + "bytestring 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", - "string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-rt" -version = "0.2.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-threadpool 0.3.1 (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.29 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-server" -version = "0.6.1" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "actix-rt 0.2.6 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (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.11.1 (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.10 (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)", -] - -[[package]] -name = "actix-server-config" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.29 (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)", ] [[package]] name = "actix-service" -version = "0.4.2" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-testing" -version = "0.1.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "actix-rt 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server 0.6.1 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-threadpool" -version = "0.1.2" +version = "0.3.1" 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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "threadpool 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "actix-tls" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "actix-utils" -version = "0.4.7" +version = "1.0.6" 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-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)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "actix-web" -version = "1.0.9" -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.11 (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.6 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-server 0.6.1 (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-testing 0.1.0 (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.7 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-web-codegen 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "awc 0.2.8 (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)", +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-router 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-testing 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-threadpool 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web-codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "awc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", "encoding_rs 0.8.20 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.14 (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)", + "pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (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)", @@ -236,7 +246,7 @@ dependencies = [ [[package]] name = "actix-web-codegen" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -249,14 +259,6 @@ name = "adler32" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "ahash" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "aho-corasick" version = "0.7.6" @@ -280,6 +282,16 @@ name = "arrayvec" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "async-trait" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "atty" version = "0.2.13" @@ -296,24 +308,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "awc" -version = "0.2.8" +version = "1.0.1" 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.11 (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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.3.14 (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.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (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)", ] [[package]] @@ -439,6 +451,19 @@ dependencies = [ "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "bytes" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "bytestring" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "c2-chacha" version = "0.2.3" @@ -481,7 +506,7 @@ dependencies = [ "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -527,31 +552,13 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "nom 4.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rust-ini 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde-hjson 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", "yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "const-random" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "const-random-macro" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "constant_time_eq" version = "0.1.4" @@ -576,7 +583,7 @@ dependencies = [ "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "publicsuffix 1.5.4 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", "try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -753,32 +760,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "derive_more" -version = "0.14.1" +version = "0.99.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (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.44 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "derive_more" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "lazy_static 1.4.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.13 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.3.1 (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.44 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -856,7 +849,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "strsim 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -880,12 +873,13 @@ dependencies = [ [[package]] name = "enum-as-inner" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)", + "heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -917,7 +911,7 @@ name = "erased-serde" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -961,7 +955,6 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.65 (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 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1007,6 +1000,29 @@ name = "futures" version = "0.1.29" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "futures" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "futures-channel" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "futures-channel-preview" version = "0.3.0-alpha.16" @@ -1015,6 +1031,11 @@ dependencies = [ "futures-core-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)", ] +[[package]] +name = "futures-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "futures-core-preview" version = "0.3.0-alpha.16" @@ -1029,6 +1050,16 @@ dependencies = [ "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "futures-executor" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "futures-executor-preview" version = "0.3.0-alpha.16" @@ -1041,6 +1072,11 @@ dependencies = [ "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "futures-io" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "futures-io-preview" version = "0.3.0-alpha.16" @@ -1049,6 +1085,17 @@ dependencies = [ "futures-core-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)", ] +[[package]] +name = "futures-macro" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "futures-preview" version = "0.3.0-alpha.16" @@ -1062,6 +1109,11 @@ dependencies = [ "futures-util-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)", ] +[[package]] +name = "futures-sink" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "futures-sink-preview" version = "0.3.0-alpha.16" @@ -1071,6 +1123,30 @@ dependencies = [ "futures-core-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)", ] +[[package]] +name = "futures-task" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "futures-util" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "futures-util-preview" version = "0.3.0-alpha.16" @@ -1086,6 +1162,14 @@ dependencies = [ "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "generic-array" version = "0.12.3" @@ -1161,12 +1245,21 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.6.3" +name = "h2" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)", - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "indexmap 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1182,6 +1275,14 @@ dependencies = [ "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "hermit-abi" version = "0.1.3" @@ -1227,6 +1328,16 @@ dependencies = [ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "http" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.5.4 (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)", +] + [[package]] name = "http-body" version = "0.1.0" @@ -1523,15 +1634,6 @@ dependencies = [ "unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "miniz-sys" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "miniz_oxide" version = "0.3.5" @@ -1542,9 +1644,10 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.19" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "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.4 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1564,7 +1667,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1729,6 +1832,15 @@ dependencies = [ "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "lock_api 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "parking_lot_core" version = "0.4.0" @@ -1755,6 +1867,19 @@ dependencies = [ "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "parking_lot_core" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cfg-if 0.1.10 (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.65 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "peeking_take_while" version = "0.1.2" @@ -1770,6 +1895,29 @@ name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "pin-project" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-internal" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "pin-project-lite" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "pin-utils" version = "0.1.0-alpha.4" @@ -1795,6 +1943,11 @@ dependencies = [ "syn 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "proc-macro-nested" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "proc-macro2" version = "0.4.30" @@ -2059,7 +2212,7 @@ dependencies = [ "mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2236,7 +2389,7 @@ dependencies = [ "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "debugid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", "url_serde 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2250,10 +2403,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "serde" -version = "1.0.102" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2270,7 +2423,7 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.102" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2285,7 +2438,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2303,7 +2456,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" 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.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2314,7 +2467,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" 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.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2339,15 +2492,6 @@ name = "shlex" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "signal-hook" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", - "signal-hook-registry 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "signal-hook-registry" version = "1.1.1" @@ -2408,7 +2552,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "slog 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2454,6 +2598,11 @@ dependencies = [ "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "smallvec" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "socket2" version = "0.3.11" @@ -2512,13 +2661,12 @@ dependencies = [ name = "syncstorage" version = "0.2.1" dependencies = [ - "actix-cors 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-http 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "actix-rt 0.2.6 (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.9 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-cors 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "cadence 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", "config 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2528,7 +2676,7 @@ dependencies = [ "docopt 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "googleapis-raw 0.0.1", "grpcio 0.5.0-alpha.5 (registry+https://github.com/rust-lang/crates.io-index)", "hawk 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2546,8 +2694,8 @@ dependencies = [ "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "scheduled-thread-pool 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "sentry 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2559,7 +2707,7 @@ dependencies = [ "slog-stdlog 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "slog-term 2.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-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "uuid 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "validator 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2646,7 +2794,7 @@ 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.29 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.11.1 (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.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2658,23 +2806,33 @@ dependencies = [ ] [[package]] -name = "tokio-buf" -version = "0.1.1" +name = "tokio" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "signal-hook-registry 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "tokio-codec" +name = "tokio-buf" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "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.29 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2714,7 +2872,7 @@ dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.11.1 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2723,22 +2881,6 @@ dependencies = [ "tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "tokio-signal" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.65 (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.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (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.10 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "tokio-sync" version = "0.1.7" @@ -2756,7 +2898,7 @@ dependencies = [ "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.21 (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.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2789,17 +2931,16 @@ dependencies = [ ] [[package]] -name = "tokio-udp" -version = "0.1.5" +name = "tokio-util" +version = "0.2.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.29 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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.10 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2807,49 +2948,44 @@ name = "toml" version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "trust-dns-proto" -version = "0.7.4" +version = "0.18.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "async-trait 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "enum-as-inner 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", - "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (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.10 (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.5 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "trust-dns-resolver" -version = "0.11.1" +version = "0.18.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.4 (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.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (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.13 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-executor 0.1.8 (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 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "trust-dns-proto 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2902,6 +3038,11 @@ dependencies = [ "smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unicode-xid" version = "0.1.0" @@ -2942,7 +3083,7 @@ name = "url_serde" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2952,7 +3093,7 @@ version = "0.7.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.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2961,7 +3102,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2972,8 +3113,8 @@ dependencies = [ "idna 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3126,29 +3267,30 @@ dependencies = [ ] [metadata] -"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.11 (registry+https://github.com/rust-lang/crates.io-index)" = "fcb50f77cd28240d344fd54afd205bae8760a3b0ad448b1716a2aa31e24db139" -"checksum actix-router 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "23224bb527e204261d0291102cb9b52713084def67d94f7874923baefe04ccf7" -"checksum actix-rt 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "88c9da1d06603d82ec2b6690fc5b80eb626cd2d6b573f3d9a71d5252e06d098e" -"checksum actix-server 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dd626534af8d0a738e5f74901fe603af0445708f91b86a7d763d80df10d562a5" -"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-testing 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "af001e97ac6750994824d400a1b7087055aab14317aa012f528d0b2b363f37f1" -"checksum actix-threadpool 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6b5ae85d13da7e6fb86b1b7bc83185e0e3bd4cc5f421c887e1803796c034d35d" -"checksum actix-utils 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)" = "908c3109948f5c37a8b57fd343a37dcad5bb1d90bfd06300ac96b17bbe017b95" -"checksum actix-web 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "af3a1b967cdbacb903c4b9ae71257a7f098d881b25eb483d0c468b7dac579b03" -"checksum actix-web-codegen 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "068a33520e21c1eea89726be4d6b3ce2e6b81046904367e1677287695a043abb" +"checksum actix-codec 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09e55f0a5c2ca15795035d90c46bd0e73a5123b72f68f12596d6ba5282051380" +"checksum actix-connect 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c95cc9569221e9802bf4c377f6c18b90ef10227d787611decf79fd47d2a8e76c" +"checksum actix-cors 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6206917d5c0fdd79d81cec9ef02d3e802df4abf276d96241e1f595d971e002" +"checksum actix-http 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c16664cc4fdea8030837ad5a845eb231fb93fc3c5c171edfefb52fad92ce9019" +"checksum actix-macros 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "21705adc76bbe4bc98434890e73a89cd00c6015e5704a60bb6eea6c3b72316b6" +"checksum actix-router 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d7a10ca4d94e8c8e7a87c5173aba1b97ba9a6563ca02b0e1cd23531093d3ec8" +"checksum actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6a0a55507046441a496b2f0d26a84a65e67c8cafffe279072412f624b5fb6d" +"checksum actix-server 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "51d3455eaac03ca3e49d7b822eb35c884b861f715627254ccbe4309d08f1841a" +"checksum actix-service 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3e4fc95dfa7e24171b2d0bb46b85f8ab0e8499e4e3caec691fc4ea65c287564" +"checksum actix-testing 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "48494745b72d0ea8ff0cf874aaf9b622a3ee03d7081ee0c04edea4f26d32c911" +"checksum actix-threadpool 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf4082192601de5f303013709ff84d81ca6a1bc4af7fb24f367a500a23c6e84e" +"checksum actix-tls 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4e5b4faaf105e9a6d389c606c298dcdb033061b00d532af9df56ff3a54995a8" +"checksum actix-utils 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "fcf8f5631bf01adec2267808f00e228b761c60c0584cc9fa0b5364f41d147f4e" +"checksum actix-web 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3158e822461040822f0dbf1735b9c2ce1f95f93b651d7a7aded00b1efbb1f635" +"checksum actix-web-codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de0878b30e62623770a4713a6338329fd0119703bafc211d3e4144f4d4a7bdd5" "checksum adler32 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" -"checksum ahash 0.2.18 (registry+https://github.com/rust-lang/crates.io-index)" = "6f33b5018f120946c1dcf279194f238a9f146725593ead1c08fa47ff22b0b5d3" "checksum aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "58fb5e95d83b38284460a5fda7d6470aa0b8844d283a0b614b8535e880800d2d" "checksum arc-swap 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "d7b8a9123b8027467bce0099fe556c628a53c8d83df0507084c31e9ba2e39aff" "checksum arrayref 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0d382e583f07208808f6b1249e60848879ba3543f57c32277bf52d69c2f0f0ee" "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +"checksum async-trait 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "750b1c38a1dfadd108da0f01c08f4cdc7ff1bb39b325f9c82cc972361780a6e1" "checksum atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "1803c647a3ec87095e7ae7acfca019e98de5ec9a7d01343f611cf3152ed71a90" "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" -"checksum awc 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "5e995283278dd3bf0449e7534e77184adb1570c0de8b6a50bf7c9d01ad8db8c4" +"checksum awc 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d7601d4d1d7ef2335d6597a41b5fe069f6ab799b85f53565ab390e7b7065aac5" "checksum backtrace 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)" = "924c76597f0d9ca25d762c25a4d369d51267536465dc5064bdf0eb073ed477ea" "checksum backtrace-sys 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)" = "5d6575f128516de27e3ce99689419835fce9643a9b215a14d2b5b685be018491" "checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" @@ -3163,6 +3305,8 @@ dependencies = [ "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a7c3dd8985a7111efc5c80b44e23ecdd8c007de8ade3b96595387e812b957cf5" "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +"checksum bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" +"checksum bytestring 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "fc267467f58ef6cc8874064c62a0423eb0d099362c8a23edd1c6d044f46eead4" "checksum c2-chacha 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "214238caa1bf3a496ec3392968969cab8549f96ff30652c9e56885329315f6bb" "checksum cadence 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4cc8802110b3a8650896ab9ab0578b5b3057a112ccb0832b5c2ffebfccacc0db" "checksum cc 1.0.47 (registry+https://github.com/rust-lang/crates.io-index)" = "aa87058dce70a3ff5621797f1506cb837edd02ac4c0ae642b4542dce802908b8" @@ -3173,8 +3317,6 @@ dependencies = [ "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" "checksum cmake 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "81fb25b677f8bf1eb325017cb6bb8452f87969db0fedb4f757b297bee78a7c62" "checksum config 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f9107d78ed62b3fa5a86e7d18e647abed48cfd8f8fab6c72f4cdb982d196f7e6" -"checksum const-random 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7b641a8c9867e341f3295564203b1c250eb8ce6cb6126e007941f78c4d2ed7fe" -"checksum const-random-macro 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c750ec12b83377637110d5a57f5ae08e895b06c4b16e2bdbf1a94ef717428c59" "checksum constant_time_eq 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "995a44c877f9212528ccc74b21a232f66ad69001e40ede5bcee2ac9ef2657120" "checksum cookie 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" "checksum cookie_store 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" @@ -3195,8 +3337,7 @@ dependencies = [ "checksum curl 0.4.25 (registry+https://github.com/rust-lang/crates.io-index)" = "06aa71e9208a54def20792d877bc663d6aae0732b9852e612c4a933177c31283" "checksum curl-sys 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "f659f3ffac9582d6177bb86d1d2aa649f4eb9d0d4de9d03ccc08b402832ea340" "checksum debugid 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "088c9627adec1e494ff9dea77377f1e69893023d631254a0ec68b16ee20be3e9" -"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 derive_more 0.99.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2159be042979966de68315bce7034bb000c775f22e3e834e1c52ff78f041cae8" "checksum diesel 1.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d7cc03b910de9935007861dce440881f69102aaaedfd4bc5a6f40340ca5840c" "checksum diesel_derives 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" "checksum diesel_logger 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d73a791d0f0fff4bc6244bd8b70776a45b1140716411efe1364be9a868cbea7" @@ -3208,7 +3349,7 @@ dependencies = [ "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.20 (registry+https://github.com/rust-lang/crates.io-index)" = "87240518927716f79692c2ed85bfe6e98196d18c6401ec75355760233a7e12e9" -"checksum enum-as-inner 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3d58266c97445680766be408285e798d3401c6d4c378ec5552e78737e681e37d" +"checksum enum-as-inner 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "900a6c7fbe523f4c2884eaf26b57b81bb69b6810a01a236390a7ac021d09492e" "checksum env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcde04e90a5226a6443b7aabdb016ba2f8307c847d524724bd9b346dd1a2d3" "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" "checksum erased-serde 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3beee4bc16478a1b26f2e80ad819a52d24745e292f521a63c16eea5f74b7eb60" @@ -3224,27 +3365,39 @@ dependencies = [ "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.29 (registry+https://github.com/rust-lang/crates.io-index)" = "1b980f2816d6ee8673b6517b52cb0e808a180efc92e5c19d02cdda79066703ef" +"checksum futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5c329ae8753502fb44ae4fc2b622fa2a94652c41e795143765ba0927f92ab780" +"checksum futures-channel 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c77d04ce8edd9cb903932b608268b3fffec4163dc053b3b402bf47eac1f1a8" "checksum futures-channel-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)" = "" +"checksum futures-core 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f25592f769825e89b92358db00d26f965761e094951ac44d3663ef25b7ac464a" "checksum futures-core-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)" = "" "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +"checksum futures-executor 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f674f3e1bcb15b37284a90cedf55afdba482ab061c407a9c0ebbd0f3109741ba" "checksum futures-executor-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)" = "" +"checksum futures-io 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a638959aa96152c7a4cddf50fcb1e3fede0583b27157c26e67d6f99904090dc6" "checksum futures-io-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)" = "" +"checksum futures-macro 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9a5081aa3de1f7542a794a397cde100ed903b0630152d0973479018fd85423a7" "checksum futures-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)" = "" +"checksum futures-sink 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "3466821b4bc114d95b087b850a724c6f83115e929bc88f1fa98a3304a944c8a6" "checksum futures-sink-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)" = "" +"checksum futures-task 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7b0a34e53cf6cdcd0178aa573aed466b646eb3db769570841fda0c7ede375a27" +"checksum futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "22766cf25d64306bedf0384da004d05c9974ab104fcc4528f1236181c18004c5" "checksum futures-util-preview 0.3.0-alpha.16 (git+https://github.com/rust-lang-nursery/futures-rs?rev=744ece9)" = "" +"checksum fxhash 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" "checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum getrandom 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "e7db7ca94ed4cd01190ceee0d8a8052f08a247aa1b469a7f68c6a3b71afcf407" "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" "checksum grpcio 0.5.0-alpha.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1463096cfc371772d59a48fbfc471e18892e197efc5867b3bd7c2e0428e97824" "checksum grpcio-sys 0.5.0-alpha.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c8aebf59fdf3668edf163c1948ceca64c4ebb733d71c9055a12219d336bd5d51" "checksum h2 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" -"checksum hashbrown 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" +"checksum h2 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b9433d71e471c1736fd5a61b671fc0b148d7a2992f666c958d03cd8feb3b88d1" "checksum hawk 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7afdba594720e9250e3d3609ec309f8adb26fa18ce39834aeb6724a30bc2431c" +"checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "307c3c9f937f38e3534b1d6447ecf090cafcc9744e4a6360e8b037b2cf5af120" "checksum hkdf 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3fa08a006102488bd9cd5b8013aabe84955cf5ae22e304c2caf655b633aefae3" "checksum hmac 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5dcb5e64cda4c23119ab41ba960d1e170a774c8e4b9d9e6a9bc18aabf5e59695" "checksum hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "21ceb46a83a85e824ef93669c8b390009623863b5c195d1ba747292c0c72f94e" "checksum http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "d7e06e336150b178206af098a055e3621e8336027e2b4d126bda0bc64824baaf" +"checksum http 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b708cc7f06493459026f53b9a61a7a121a5d1ec6238dee58ea4941132b30156b" "checksum http-body 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" "checksum httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" "checksum httpdate 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" @@ -3281,9 +3434,8 @@ dependencies = [ "checksum migrations_macros 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "719ef0bc7f531428764c9b70661c14abd50a7f3d21f355752d9985aa21251c9e" "checksum mime 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "dd1d63acd1b78403cc0c325605908475dd9b9a3acbf65ed8bcab97e27014afcf" "checksum mime_guess 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a0ed03949aef72dbdf3116a383d7b38b4768e6f960528cd6a6044aa9ed68599" -"checksum miniz-sys 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" "checksum miniz_oxide 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6f3f74f726ae935c3f514300cc6773a0c9492abc5e972d42ba0c0ebb88757625" -"checksum mio 0.6.19 (registry+https://github.com/rust-lang/crates.io-index)" = "83f51996a3ed004ef184e16818edc51fadffe8e7ca68be67f9dee67d84d0ff23" +"checksum mio 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "302dec22bcf6bae6dfb69c647187f4b4d0fb6f535521f7bc022430ce8e12008f" "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 mozsvc-common 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "efdfe5192ed6adb12e2f703d7a5f3facdfc3bda787a004930ee7ed2859aceb2e" @@ -3300,17 +3452,23 @@ dependencies = [ "checksum openssl 0.10.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2f372b2b53ce10fb823a337aaa674e3a7d072b957c6264d0f4ff0bd86e657449" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.52 (registry+https://github.com/rust-lang/crates.io-index)" = "c977d08e1312e2f7e4b86f9ebaa0ed3b19d1daff75fae88bbb88108afbd801fc" +"checksum parking_lot 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "92e98c49ab0b7ce5b222f2cc9193fc4efe11c6d0bd4f648e374684a6857b1cfc" "checksum parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ab41b4aed082705d1056416ae4468b6ea99d52599ecf3169b00088d43113e337" "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.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" +"checksum parking_lot_core 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7582838484df45743c8434fbff785e8edf260c28748353d44bc0da32e0ceabf1" "checksum peeking_take_while 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" "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 pin-project 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7804a463a8d9572f13453c516a5faea534a2403d7ced2f0c7e100eeff072772c" +"checksum pin-project-internal 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "385322a45f2ecf3410c68d2a549a4a2685e8051d0f278e39743ff4e451cb9b3f" +"checksum pin-project-lite 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "237844750cfbb86f67afe27eee600dfbbcb6188d734139b534cbfbf4f96792ae" "checksum pin-utils 0.1.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)" = "5894c618ce612a3fa23881b152b608bafb8c56cfc22f434a3ba3120b40f7b587" "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum ppv-lite86 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "74490b50b9fbe561ac330df47c08f3f33073d2d00c150f719147d7c54522fa1b" "checksum proc-macro-hack 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5" +"checksum proc-macro-nested 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "369a6ed065f249a159e06c45752c780bda2fb53c995718f9e484d08daa9eb42e" "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" "checksum proc-macro2 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9c9e470a8dc4aeae2dee2f335e8f533e2d4b347e1434e5671afc49b054592f27" "checksum protobuf 2.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5f00e4a3cb64ecfeac2c0a73c74c68ae3439d7a6bead3870be56ad5dd2620a6f" @@ -3360,9 +3518,9 @@ dependencies = [ "checksum sentry 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fe4ea18f306c959be49f1bea8f3911a454e5d09d2dc43307215729e636bfbf4b" "checksum sentry-types 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b23e3d9c8c6e4a1523f24df6753c4088bfe16c44a73c8881c1d23c70f28ae280" "checksum serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" -"checksum serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4b39bd9b0b087684013a792c59e3e07a46a01d2322518d8a1104641a0b1be0" +"checksum serde 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" "checksum serde-hjson 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0b833c5ad67d52ced5f5938b2980f32a9c1c5ef047f0b4fb3127e7a423c76153" -"checksum serde_derive 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)" = "ca13fc1a832f793322228923fbb3aba9f3f44444898f835d31ad1b74fa0a2bf8" +"checksum serde_derive 1.0.104 (registry+https://github.com/rust-lang/crates.io-index)" = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" "checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2" "checksum serde_test 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "110b3dbdf8607ec493c22d5d947753282f3bae73c0f56d322af1e8c78e4c23d5" "checksum serde_urlencoded 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" @@ -3370,7 +3528,6 @@ dependencies = [ "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d" "checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" -"checksum signal-hook 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)" = "cb543aecec4ba8b867f41284729ddfdb7e8fcd70ec3d7d37fca3007a4b53675f" "checksum signal-hook-registry 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1797d48f38f91643908bb14e35e79928f9f4b3cefb2420a564dde0991b4358dc" "checksum sized-chunks 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9d3e7f23bad2d6694e0f46f5e470ec27eb07b8f3e8b309a4b0dc17501928b9f2" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" @@ -3382,6 +3539,7 @@ dependencies = [ "checksum slog-stdlog 4.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be4d87903baf655da2d82bc3ac3f7ef43868c58bf712b3a661fda72009304c23" "checksum slog-term 2.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "54b50e85b73c2bd42ceb97b6ded235576d405bd1e974242ccfe634fa269f6da7" "checksum smallvec 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)" = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +"checksum smallvec 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5c2fb2ec9bcd216a5b0d0ccf31ab17b5ed1d627960edff65bbe95d3ce221cefc" "checksum socket2 0.3.11 (registry+https://github.com/rust-lang/crates.io-index)" = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" "checksum spin 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" "checksum string 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" @@ -3398,21 +3556,20 @@ dependencies = [ "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 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +"checksum tokio 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8fdd17989496f49cdc57978c96f0c9fe5e4a58a8bddc6813c449a4624f6a030b" "checksum tokio-buf 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -"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.8 (registry+https://github.com/rust-lang/crates.io-index)" = "0f27ee0e6db01c5f0b2973824547ce7e637b2ed79b891a9677b0de9bd532b6ac" "checksum tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5090db468dad16e1a7a54c8c67280c5e4b544f3d3e018f0b913b400261f85926" "checksum tokio-reactor 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "c56391be9805bc80163151c0b9e5164ee64f4b0200962c346fea12773158f22d" -"checksum tokio-signal 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "dd6dc5276ea05ce379a16de90083ec80836440d5ef8a6a39545a3207373b8296" "checksum tokio-sync 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "d06554cce1ae4a50f42fba8023918afa931413aded705b560e29600ccf7c6d76" "checksum tokio-tcp 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1d14b10654be682ac43efee27401d792507e30fd8d26389e1da3b185de2e4119" "checksum tokio-threadpool 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2bd2c6a3885302581f4401c82af70d792bb9df1700e7437b0aeb4ada94d5388c" "checksum tokio-timer 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "f2106812d500ed25a4f38235b9cae8f78a09edf43203e16e59c3b769a342a60e" -"checksum tokio-udp 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f02298505547f73e60f568359ef0d016d5acd6e830ab9bc7c4a5b3403440121b" +"checksum tokio-util 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "571da51182ec208780505a32528fc5512a8fe1443ab960b3f2f3ef093cd16930" "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" -"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 trust-dns-proto 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2a7f3a2ab8a919f5eca52a468866a67ed7d3efa265d48a652a9a3452272b413f" +"checksum trust-dns-resolver 0.18.0-alpha.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6f90b1502b226f8b2514c6d5b37bafa8c200d7ca4102d57dc36ee0f3b7a04a2f" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum try_from 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" "checksum typenum 1.11.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" @@ -3420,6 +3577,7 @@ dependencies = [ "checksum unicase 2.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" "checksum unicode-normalization 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "09c8070a9942f5e7cfccd93f490fdebd230ee3c3c9f107cb25bad5351ef671cf" +"checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" diff --git a/db-tests/src/batch.rs b/db-tests/src/batch.rs index cd117ddd2c..ee07b28518 100644 --- a/db-tests/src/batch.rs +++ b/db-tests/src/batch.rs @@ -54,21 +54,16 @@ async fn create_delete() -> Result<()> { let uid = 1; let coll = "clients"; - let id = db.create_batch(cb(uid, coll, vec![])).compat().await?; - assert!( - db.validate_batch(vb(uid, coll, id.clone())) - .compat() - .await? - ); + let id = db.create_batch(cb(uid, coll, vec![])).await?; + assert!(db.validate_batch(vb(uid, coll, id.clone())).await?); db.delete_batch(params::DeleteBatch { user_id: hid(uid), collection: coll.to_owned(), id: id.clone(), }) - .compat() .await?; - assert!(!db.validate_batch(vb(uid, coll, id)).compat().await?); + assert!(!db.validate_batch(vb(uid, coll, id)).await?); Ok(()) } @@ -79,18 +74,14 @@ async fn expiry() -> Result<()> { let uid = 1; let coll = "clients"; let id = with_delta!(db, -(BATCH_LIFETIME + 11), { - db.create_batch(cb(uid, coll, vec![])).compat().await + db.create_batch(cb(uid, coll, vec![])).await })?; - assert!( - !db.validate_batch(vb(uid, coll, id.clone())) - .compat() - .await? - ); - let result = db.get_batch(gb(uid, coll, id.clone())).compat().await?; + assert!(!db.validate_batch(vb(uid, coll, id.clone())).await?); + let result = db.get_batch(gb(uid, coll, id.clone())).await?; assert!(result.is_none()); let bsos = vec![postbso("b0", Some("payload 0"), Some(10), None)]; - let result = db.append_to_batch(ab(uid, coll, id, bsos)).compat().await; + let result = db.append_to_batch(ab(uid, coll, id, bsos)).await; let is_batch_not_found = match result.unwrap_err().kind() { ApiErrorKind::Db(dbe) => match dbe.kind() { DbErrorKind::BatchNotFound => true, @@ -108,12 +99,8 @@ async fn update() -> Result<()> { let uid = 1; let coll = "clients"; - let id = db.create_batch(cb(uid, coll, vec![])).compat().await?; - assert!(db - .get_batch(gb(uid, coll, id.clone())) - .compat() - .await? - .is_some()); + let id = db.create_batch(cb(uid, coll, vec![])).await?; + assert!(db.get_batch(gb(uid, coll, id.clone())).await?.is_some()); // XXX: now bogus under spanner //assert_eq!(batch.bsos, "".to_owned()); @@ -121,11 +108,9 @@ async fn update() -> Result<()> { postbso("b0", Some("payload 0"), Some(10), None), postbso("b1", Some("payload 1"), Some(1_000_000_000), None), ]; - db.append_to_batch(ab(uid, coll, id.clone(), bsos)) - .compat() - .await?; + db.append_to_batch(ab(uid, coll, id.clone(), bsos)).await?; - assert!(db.get_batch(gb(uid, coll, id)).compat().await?.is_some()); + assert!(db.get_batch(gb(uid, coll, id)).await?.is_some()); // XXX: now bogus under spanner //assert_ne!(batch.bsos, "".to_owned()); Ok(()) @@ -141,37 +126,33 @@ async fn append_commit() -> Result<()> { postbso("b0", Some("payload 0"), Some(10), None), postbso("b1", Some("payload 1"), Some(1_000_000_000), None), ]; - let id = db.create_batch(cb(uid, coll, bsos1)).compat().await?; + let id = db.create_batch(cb(uid, coll, bsos1)).await?; let bsos2 = vec![postbso("b2", Some("payload 2"), None, Some(1000))]; - db.append_to_batch(ab(uid, coll, id.clone(), bsos2)) - .compat() - .await?; + db.append_to_batch(ab(uid, coll, id.clone(), bsos2)).await?; - let batch = db.get_batch(gb(uid, coll, id)).compat().await?.unwrap(); + let batch = db.get_batch(gb(uid, coll, id)).await?.unwrap(); let result = db .commit_batch(params::CommitBatch { user_id: hid(uid), collection: coll.to_owned(), batch, }) - .compat() .await?; debug!("result: {:?}", &result); - assert!(db.get_bso(gbso(uid, coll, "b0")).compat().await?.is_some()); - assert!(db.get_bso(gbso(uid, coll, "b2")).compat().await?.is_some()); + assert!(db.get_bso(gbso(uid, coll, "b0")).await?.is_some()); + assert!(db.get_bso(gbso(uid, coll, "b2")).await?.is_some()); let ts = db .get_collection_timestamp(params::GetCollectionTimestamp { user_id: hid(uid), collection: coll.to_owned(), }) - .compat() .await?; assert_eq!(result.modified, ts); - let bso = db.get_bso(gbso(uid, coll, "b1")).compat().await?.unwrap(); + let bso = db.get_bso(gbso(uid, coll, "b1")).await?.unwrap(); assert_eq!(bso.sortindex, Some(1_000_000_000)); assert_eq!(bso.payload, "payload 1"); Ok(()) diff --git a/db-tests/src/db_tests.rs b/db-tests/src/db_tests.rs index e062a06863..a8c01ec9d8 100644 --- a/db-tests/src/db_tests.rs +++ b/db-tests/src/db_tests.rs @@ -33,13 +33,13 @@ async fn bso_successfully_updates_single_values() -> Result<()> { Some(sortindex), Some(ttl), ); - db.put_bso(bso1).compat().await?; + db.put_bso(bso1).await?; let payload = "Updated payload"; let bso2 = pbso(uid, coll, bid, Some(payload), None, None); - db.put_bso(bso2).compat().await?; + db.put_bso(bso2).await?; - let bso = db.get_bso(gbso(uid, coll, bid)).compat().await?.unwrap(); + let bso = db.get_bso(gbso(uid, coll, bid)).await?.unwrap(); assert_eq!(bso.modified, db.timestamp()); assert_eq!(bso.payload, payload); assert_eq!(bso.sortindex, Some(sortindex)); @@ -47,8 +47,8 @@ async fn bso_successfully_updates_single_values() -> Result<()> { let sortindex = 2; let bso2 = pbso(uid, coll, bid, None, Some(sortindex), None); - db.put_bso(bso2).compat().await?; - let bso = db.get_bso(gbso(uid, coll, bid)).compat().await?.unwrap(); + db.put_bso(bso2).await?; + let bso = db.get_bso(gbso(uid, coll, bid)).await?.unwrap(); assert_eq!(bso.modified, db.timestamp()); assert_eq!(bso.payload, payload); assert_eq!(bso.sortindex, Some(sortindex)); @@ -66,11 +66,11 @@ async fn bso_modified_not_changed_on_ttl_touch() -> Result<()> { let timestamp = db.timestamp().as_i64(); let bso1 = pbso(uid, coll, bid, Some("hello"), Some(1), Some(10)); - with_delta!(db, -100, { db.put_bso(bso1).compat().await })?; + with_delta!(db, -100, { db.put_bso(bso1).await })?; let bso2 = pbso(uid, coll, bid, None, None, Some(15)); - db.put_bso(bso2).compat().await?; - let bso = db.get_bso(gbso(uid, coll, bid)).compat().await?.unwrap(); + db.put_bso(bso2).await?; + let bso = db.get_bso(gbso(uid, coll, bid)).await?.unwrap(); // ttl has changed assert_eq!(bso.expiry, timestamp + (15 * 1000)); // modified has not changed @@ -86,14 +86,14 @@ async fn put_bso_updates() -> Result<()> { let coll = "clients"; let bid = "1"; let bso1 = pbso(uid, coll, bid, Some("initial"), None, None); - db.put_bso(bso1).compat().await?; + db.put_bso(bso1).await?; let payload = "Updated"; let sortindex = 200; let bso2 = pbso(uid, coll, bid, Some(payload), Some(sortindex), None); - db.put_bso(bso2).compat().await?; + db.put_bso(bso2).await?; - let bso = db.get_bso(gbso(uid, coll, bid)).compat().await?.unwrap(); + let bso = db.get_bso(gbso(uid, coll, bid)).await?.unwrap(); assert_eq!(Some(bso.payload), Some(payload.to_owned())); assert_eq!(bso.sortindex, Some(sortindex)); assert_eq!(bso.modified, db.timestamp()); @@ -116,7 +116,7 @@ async fn get_bsos_limit_offset() -> Result<()> { Some(i), Some(DEFAULT_BSO_TTL), ); - with_delta!(&db, i64::from(i) * 10, { db.put_bso(bso).compat().await })?; + with_delta!(&db, i64::from(i) * 10, { db.put_bso(bso).await })?; } let bsos = db @@ -130,7 +130,6 @@ async fn get_bsos_limit_offset() -> Result<()> { 0, &"0".to_owned(), )) - .compat() .await?; assert!(bsos.items.is_empty()); assert_eq!(bsos.offset, Some("0".to_string())); @@ -146,7 +145,6 @@ async fn get_bsos_limit_offset() -> Result<()> { -1, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), size as usize); assert_eq!(bsos.offset, None); @@ -171,7 +169,6 @@ async fn get_bsos_limit_offset() -> Result<()> { limit, &offset, )) - .compat() .await?; assert_eq!(bsos.items.len(), 5 as usize); if let Some(ref offset) = bsos.offset { @@ -194,7 +191,6 @@ async fn get_bsos_limit_offset() -> Result<()> { limit, &bsos.offset.unwrap(), )) - .compat() .await?; assert_eq!(bsos2.items.len(), 5 as usize); if let Some(ref offset) = bsos2.offset { @@ -216,7 +212,6 @@ async fn get_bsos_limit_offset() -> Result<()> { limit, &bsos2.offset.unwrap(), )) - .compat() .await?; assert_eq!(bsos3.items.len(), 2 as usize); assert_eq!(bsos3.offset, None); @@ -242,7 +237,7 @@ async fn get_bsos_newer() -> Result<()> { Some(1), Some(DEFAULT_BSO_TTL), ); - with_delta!(&db, -i * 10, { db.put_bso(pbso).compat().await })?; + with_delta!(&db, -i * 10, { db.put_bso(pbso).await })?; } let bsos = db @@ -256,7 +251,6 @@ async fn get_bsos_newer() -> Result<()> { 10, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), 3); assert_eq!(bsos.items[0].id, "b0"); @@ -274,7 +268,6 @@ async fn get_bsos_newer() -> Result<()> { 10, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), 2); assert_eq!(bsos.items[0].id, "b0"); @@ -291,7 +284,6 @@ async fn get_bsos_newer() -> Result<()> { 10, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), 1); assert_eq!(bsos.items[0].id, "b0"); @@ -307,7 +299,6 @@ async fn get_bsos_newer() -> Result<()> { 10, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), 0); Ok(()) @@ -329,9 +320,7 @@ async fn get_bsos_sort() -> Result<()> { Some(*sortindex), Some(DEFAULT_BSO_TTL), ); - with_delta!(&db, -(revi as i64) * 10, { - db.put_bso(pbso).compat().await - })?; + with_delta!(&db, -(revi as i64) * 10, { db.put_bso(pbso).await })?; } let bsos = db @@ -345,7 +334,6 @@ async fn get_bsos_sort() -> Result<()> { 10, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), 3); assert_eq!(bsos.items[0].id, "b0"); @@ -363,7 +351,6 @@ async fn get_bsos_sort() -> Result<()> { 10, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), 3); assert_eq!(bsos.items[0].id, "b2"); @@ -381,7 +368,6 @@ async fn get_bsos_sort() -> Result<()> { 10, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), 3); assert_eq!(bsos.items[0].id, "b2"); @@ -397,15 +383,11 @@ async fn delete_bsos_in_correct_collection() -> Result<()> { let uid = *UID; let payload = "data"; db.put_bso(pbso(uid, "clients", "b1", Some(payload), None, None)) - .compat() .await?; db.put_bso(pbso(uid, "crypto", "b1", Some(payload), None, None)) - .compat() .await?; - db.delete_bsos(dbsos(uid, "clients", &["b1"])) - .compat() - .await?; - let bso = db.get_bso(gbso(uid, "crypto", "b1")).compat().await?; + db.delete_bsos(dbsos(uid, "clients", &["b1"])).await?; + let bso = db.get_bso(gbso(uid, "crypto", "b1")).await?; assert!(bso.is_some()); Ok(()) } @@ -415,18 +397,17 @@ async fn get_storage_timestamp() -> Result<()> { let db = db().await?; let uid = *UID; - db.create_collection("col1".to_owned()).compat().await?; - let col2 = db.create_collection("col2".to_owned()).compat().await?; - db.create_collection("col3".to_owned()).compat().await?; + db.create_collection("col1".to_owned()).await?; + let col2 = db.create_collection("col2".to_owned()).await?; + db.create_collection("col3".to_owned()).await?; with_delta!(&db, 100_000, { db.touch_collection(params::TouchCollection { user_id: hid(uid), collection_id: col2, }) - .compat() .await?; - let m = db.get_storage_timestamp(hid(uid)).compat().await?; + let m = db.get_storage_timestamp(hid(uid)).await?; assert_eq!(m, db.timestamp()); Ok(()) }) @@ -435,9 +416,7 @@ async fn get_storage_timestamp() -> Result<()> { #[async_test] async fn get_collection_id() -> Result<()> { let db = db().await?; - db.get_collection_id("bookmarks".to_owned()) - .compat() - .await?; + db.get_collection_id("bookmarks".to_owned()).await?; Ok(()) } @@ -446,9 +425,9 @@ async fn create_collection() -> Result<()> { let db = db().await?; let name = "NewCollection"; - let cid = db.create_collection(name.to_owned()).compat().await?; + let cid = db.create_collection(name.to_owned()).await?; assert_ne!(cid, 0); - let cid2 = db.get_collection_id(name.to_owned()).compat().await?; + let cid2 = db.get_collection_id(name.to_owned()).await?; assert_eq!(cid2, cid); Ok(()) } @@ -457,12 +436,11 @@ async fn create_collection() -> Result<()> { async fn touch_collection() -> Result<()> { let db = db().await?; - let cid = db.create_collection("test".to_owned()).compat().await?; + let cid = db.create_collection("test".to_owned()).await?; db.touch_collection(params::TouchCollection { user_id: hid(1), collection_id: cid, }) - .compat() .await?; Ok(()) } @@ -475,7 +453,6 @@ async fn delete_collection() -> Result<()> { let coll = "NewCollection"; for bid in 1..=3 { db.put_bso(pbso(uid, coll, &bid.to_string(), Some("test"), None, None)) - .compat() .await?; } let ts = db @@ -483,17 +460,13 @@ async fn delete_collection() -> Result<()> { user_id: hid(uid), collection: coll.to_owned(), }) - .compat() .await?; - let ts2 = db.get_storage_timestamp(hid(uid)).compat().await?; + let ts2 = db.get_storage_timestamp(hid(uid)).await?; assert_eq!(ts2, ts); // make sure BSOs are deleted for bid in 1..=3 { - let result = db - .get_bso(gbso(uid, coll, &bid.to_string())) - .compat() - .await?; + let result = db.get_bso(gbso(uid, coll, &bid.to_string())).await?; assert!(result.is_none()); } @@ -502,7 +475,6 @@ async fn delete_collection() -> Result<()> { user_id: uid.into(), collection: coll.to_string(), }) - .compat() .await; assert!(result.unwrap_err().is_collection_not_found()); Ok(()) @@ -518,7 +490,6 @@ async fn delete_collection_tombstone() -> Result<()> { let coll2 = "test2"; let ts1 = with_delta!(db, -100, { db.put_bso(pbso(uid, coll, bid1, Some("test"), None, None)) - .compat() .await?; for bid2 in 1..=3 { db.put_bso(pbso( @@ -529,7 +500,6 @@ async fn delete_collection_tombstone() -> Result<()> { None, None, )) - .compat() .await?; } db.timestamp() @@ -540,7 +510,6 @@ async fn delete_collection_tombstone() -> Result<()> { user_id: hid(uid), collection: coll2.to_owned(), }) - .compat() .await?; assert!(ts2 > ts1); /* @@ -552,27 +521,20 @@ async fn delete_collection_tombstone() -> Result<()> { user_id: hid(uid), collection: coll2.to_owned(), }) - .compat() .await?; assert_eq!(ts2, ts3); */ - let ts_storage = db.get_storage_timestamp(hid(uid)).compat().await?; + let ts_storage = db.get_storage_timestamp(hid(uid)).await?; assert_eq!(ts2, ts_storage); // make sure coll2 BSOs were deleted for bid2 in 1..=3 { - let result = db - .get_bso(gbso(uid, coll2, &bid2.to_string())) - .compat() - .await?; + let result = db.get_bso(gbso(uid, coll2, &bid2.to_string())).await?; assert!(result.is_none()); } // make sure coll BSOs were *not* deleted - let result = db - .get_bso(gbso(uid, coll, &bid1.to_string())) - .compat() - .await?; + let result = db.get_bso(gbso(uid, coll, &bid1.to_string())).await?; assert!(result.is_some()); Ok(()) } @@ -583,14 +545,13 @@ async fn get_collection_timestamps() -> Result<()> { let uid = *UID; let coll = "test"; - let cid = db.create_collection(coll.to_owned()).compat().await?; + let cid = db.create_collection(coll.to_owned()).await?; db.touch_collection(params::TouchCollection { user_id: hid(uid), collection_id: cid, }) - .compat() .await?; - let cols = db.get_collection_timestamps(hid(uid)).compat().await?; + let cols = db.get_collection_timestamps(hid(uid)).await?; assert!(cols.contains_key(coll)); assert_eq!(cols.get(coll), Some(&db.timestamp())); @@ -599,7 +560,6 @@ async fn get_collection_timestamps() -> Result<()> { user_id: uid.into(), collection: coll.to_string(), }) - .compat() .await?; assert_eq!(Some(&ts), cols.get(coll)); Ok(()) @@ -611,21 +571,19 @@ async fn get_collection_timestamps_tombstone() -> Result<()> { let uid = *UID; let coll = "test"; - let cid = db.create_collection(coll.to_owned()).compat().await?; + let cid = db.create_collection(coll.to_owned()).await?; db.touch_collection(params::TouchCollection { user_id: hid(uid), collection_id: cid, }) - .compat() .await?; db.delete_collection(params::DeleteCollection { user_id: hid(uid), collection: coll.to_owned(), }) - .compat() .await?; - let cols = db.get_collection_timestamps(hid(uid)).compat().await?; + let cols = db.get_collection_timestamps(hid(uid)).await?; assert!(cols.is_empty()); Ok(()) } @@ -653,15 +611,14 @@ async fn get_collection_usage() -> Result<()> { None, None, )) - .compat() .await?; *expected.entry(coll.to_owned()).or_insert(0) += size as i64; } } - let sizes = db.get_collection_usage(hid(uid)).compat().await?; + let sizes = db.get_collection_usage(hid(uid)).await?; assert_eq!(sizes, expected); - let total = db.get_storage_usage(hid(uid)).compat().await?; + let total = db.get_storage_usage(hid(uid)).await?; assert_eq!(total, expected.values().sum::() as u64); Ok(()) } @@ -679,12 +636,11 @@ async fn get_collection_counts() -> Result<()> { expected.insert(coll.to_owned(), count); for i in 0..count { db.put_bso(pbso(uid, coll, &format!("b{}", i), Some("x"), None, None)) - .compat() .await?; } } - let counts = db.get_collection_counts(hid(uid)).compat().await?; + let counts = db.get_collection_counts(hid(uid)).await?; assert_eq!(counts, expected); Ok(()) } @@ -697,33 +653,31 @@ async fn put_bso() -> Result<()> { let coll = "NewCollection"; let bid = "b0"; let bso1 = pbso(uid, coll, bid, Some("foo"), Some(1), Some(DEFAULT_BSO_TTL)); - db.put_bso(bso1).compat().await?; + db.put_bso(bso1).await?; let ts = db .get_collection_timestamp(params::GetCollectionTimestamp { user_id: uid.into(), collection: coll.to_string(), }) - .compat() .await?; assert_eq!(ts, db.timestamp()); - let bso = db.get_bso(gbso(uid, coll, bid)).compat().await?.unwrap(); + let bso = db.get_bso(gbso(uid, coll, bid)).await?.unwrap(); assert_eq!(&bso.payload, "foo"); assert_eq!(bso.sortindex, Some(1)); let bso2 = pbso(uid, coll, bid, Some("bar"), Some(2), Some(DEFAULT_BSO_TTL)); with_delta!(&db, 19, { - db.put_bso(bso2).compat().await?; + db.put_bso(bso2).await?; let ts = db .get_collection_timestamp(params::GetCollectionTimestamp { user_id: uid.into(), collection: coll.to_string(), }) - .compat() .await?; assert_eq!(ts, db.timestamp()); - let bso = db.get_bso(gbso(uid, coll, bid)).compat().await?.unwrap(); + let bso = db.get_bso(gbso(uid, coll, bid)).await?.unwrap(); assert_eq!(&bso.payload, "bar"); assert_eq!(bso.sortindex, Some(2)); Ok(()) @@ -747,7 +701,6 @@ async fn post_bsos() -> Result<()> { ], failed: Default::default(), }) - .compat() .await?; assert!(result.success.contains(&"b0".to_owned())); @@ -761,7 +714,6 @@ async fn post_bsos() -> Result<()> { user_id: uid.into(), collection: coll.to_string(), }) - .compat() .await?; // XXX: casts assert_eq!(result.modified, ts); @@ -776,7 +728,6 @@ async fn post_bsos() -> Result<()> { ], failed: Default::default(), }) - .compat() .await?; assert_eq!(result2.success.len(), 2); @@ -784,10 +735,10 @@ async fn post_bsos() -> Result<()> { assert!(result2.success.contains(&"b0".to_owned())); assert!(result2.success.contains(&"b2".to_owned())); - let bso = db.get_bso(gbso(uid, coll, "b0")).compat().await?.unwrap(); + let bso = db.get_bso(gbso(uid, coll, "b0")).await?.unwrap(); assert_eq!(bso.sortindex, Some(11)); assert_eq!(bso.payload, "updated 0"); - let bso = db.get_bso(gbso(uid, coll, "b2")).compat().await?.unwrap(); + let bso = db.get_bso(gbso(uid, coll, "b2")).await?.unwrap(); assert_eq!(bso.sortindex, Some(22)); assert_eq!(bso.payload, "updated 2"); @@ -796,7 +747,6 @@ async fn post_bsos() -> Result<()> { user_id: uid.into(), collection: coll.to_string(), }) - .compat() .await?; assert_eq!(result2.modified, ts); Ok(()) @@ -811,14 +761,13 @@ async fn get_bso() -> Result<()> { let bid = "b0"; let payload = "a"; db.put_bso(pbso(uid, coll, bid, Some(payload), None, None)) - .compat() .await?; - let bso = db.get_bso(gbso(uid, coll, bid)).compat().await?.unwrap(); + let bso = db.get_bso(gbso(uid, coll, bid)).await?.unwrap(); assert_eq!(bso.id, bid); assert_eq!(bso.payload, payload); - let result = db.get_bso(gbso(uid, coll, "nope")).compat().await?; + let result = db.get_bso(gbso(uid, coll, "nope")).await?; assert!(result.is_none()); Ok(()) } @@ -840,7 +789,7 @@ async fn get_bsos() -> Result<()> { Some(*sortindex), None, ); - with_delta!(&db, i as i64 * 10, { db.put_bso(bso).compat().await })?; + with_delta!(&db, i as i64 * 10, { db.put_bso(bso).await })?; } let ids = db @@ -854,7 +803,6 @@ async fn get_bsos() -> Result<()> { 10, &"0".to_owned(), )) - .compat() .await?; assert_eq!(ids.items, vec!["b0", "b1", "b2", "b3", "b4"]); @@ -869,7 +817,6 @@ async fn get_bsos() -> Result<()> { 10, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), 3); assert_eq!(bsos.items[0].id, "b0"); @@ -887,7 +834,6 @@ async fn get_bsos() -> Result<()> { 2, &"0".to_owned(), )) - .compat() .await?; assert_eq!(bsos.items.len(), 2); assert_eq!(bsos.offset, Some("2".to_string())); @@ -904,14 +850,13 @@ async fn get_bso_timestamp() -> Result<()> { let coll = "clients"; let bid = "b0"; let bso = pbso(uid, coll, bid, Some("a"), None, None); - db.put_bso(bso).compat().await?; + db.put_bso(bso).await?; let ts = db .get_bso_timestamp(params::GetBsoTimestamp { user_id: uid.into(), collection: coll.to_string(), id: bid.to_string(), }) - .compat() .await?; assert_eq!(ts, db.timestamp()); Ok(()) @@ -925,10 +870,9 @@ async fn delete_bso() -> Result<()> { let coll = "clients"; let bid = "b0"; db.put_bso(pbso(uid, coll, bid, Some("a"), None, None)) - .compat() .await?; - db.delete_bso(dbso(uid, coll, bid)).compat().await?; - let bso = db.get_bso(gbso(uid, coll, bid)).compat().await?; + db.delete_bso(dbso(uid, coll, bid)).await?; + let bso = db.get_bso(gbso(uid, coll, bid)).await?; assert!(bso.is_none()); Ok(()) } @@ -949,22 +893,18 @@ async fn delete_bsos() -> Result<()> { Some(10), Some(DEFAULT_BSO_TTL), )) - .compat() .await?; } - db.delete_bso(dbso(uid, coll, "b0")).compat().await?; + db.delete_bso(dbso(uid, coll, "b0")).await?; // deleting non existant bid errors assert!(db .delete_bso(dbso(uid, coll, "bxi0")) - .compat() .await .unwrap_err() .is_bso_not_found()); - db.delete_bsos(dbsos(uid, coll, &["b1", "b2"])) - .compat() - .await?; + db.delete_bsos(dbsos(uid, coll, &["b1", "b2"])).await?; for bid in bids { - let bso = db.get_bso(gbso(uid, coll, &bid)).compat().await?; + let bso = db.get_bso(gbso(uid, coll, &bid)).await?; assert!(bso.is_none()); } Ok(()) @@ -997,23 +937,19 @@ async fn delete_storage() -> Result<()> { let uid = *UID; let bid = "test"; let coll = "my_collection"; - let cid = db.create_collection(coll.to_owned()).compat().await?; + let cid = db.create_collection(coll.to_owned()).await?; db.put_bso(pbso(uid, coll, bid, Some("test"), None, None)) - .compat() .await?; - db.delete_storage(hid(uid)).compat().await?; - let result = db.get_bso(gbso(uid, coll, bid)).compat().await?; + db.delete_storage(hid(uid)).await?; + let result = db.get_bso(gbso(uid, coll, bid)).await?; assert!(result.is_none()); // collection data sticks around - let cid2 = db - .get_collection_id("my_collection".to_owned()) - .compat() - .await?; + let cid2 = db.get_collection_id("my_collection".to_owned()).await?; assert_eq!(cid2, cid); - let collections = db.get_collection_counts(hid(uid)).compat().await?; + let collections = db.get_collection_counts(hid(uid)).await?; assert!(collections == HashMap::::new()); Ok(()) @@ -1025,16 +961,15 @@ async fn collection_cache() -> Result<()> { let uid = *UID; let coll = "test"; - let cid = db.create_collection(coll.to_owned()).compat().await?; + let cid = db.create_collection(coll.to_owned()).await?; db.touch_collection(params::TouchCollection { user_id: hid(uid), collection_id: cid, }) - .compat() .await?; db.clear_coll_cache(); - let cols = db.get_collection_timestamps(hid(uid)).compat().await?; + let cols = db.get_collection_timestamps(hid(uid)).await?; assert!(cols.contains_key(coll)); Ok(()) } @@ -1049,14 +984,10 @@ async fn lock_for_read() -> Result<()> { user_id: hid(uid), collection: coll.to_owned(), }) - .compat() .await?; - let result = db - .get_collection_id("NewCollection".to_owned()) - .compat() - .await; + let result = db.get_collection_id("NewCollection".to_owned()).await; assert!(result.unwrap_err().is_collection_not_found()); - db.commit().compat().await?; + db.commit().await?; Ok(()) } @@ -1070,12 +1001,10 @@ async fn lock_for_write() -> Result<()> { user_id: hid(uid), collection: coll.to_owned(), }) - .compat() .await?; db.put_bso(pbso(uid, coll, "1", Some("foo"), None, None)) - .compat() .await?; - db.commit().compat().await?; + db.commit().await?; Ok(()) } @@ -1083,6 +1012,6 @@ async fn lock_for_write() -> Result<()> { async fn heartbeat() -> Result<()> { let db = db().await?; - assert!(db.check().compat().await?); + assert!(db.check().await?); Ok(()) } diff --git a/db-tests/src/support.rs b/db-tests/src/support.rs index 2ed9bddafc..e3e08ceac1 100644 --- a/db-tests/src/support.rs +++ b/db-tests/src/support.rs @@ -29,7 +29,7 @@ pub async fn db() -> Result> { let metrics = metrics::Metrics::noop(); let pool = syncstorage::db::pool_from_settings(&settings, &metrics)?; - let db = pool.get().compat().await?; + let db = pool.get().await?; // Spanner won't have a timestamp until lock_for_xxx are called: fill one // in for it db.set_timestamp(SyncTimestamp::default()); diff --git a/src/db/mock.rs b/src/db/mock.rs index 6ba1d8d530..af5da3ccd4 100644 --- a/src/db/mock.rs +++ b/src/db/mock.rs @@ -15,7 +15,7 @@ impl MockDbPool { impl DbPool for MockDbPool { fn get(&self) -> DbFuture> { - Box::new(future::ok(Box::new(MockDb::new()) as Box)) + Box::pin(future::ok(Box::new(MockDb::new()) as Box)) } fn box_clone(&self) -> Box { @@ -39,18 +39,18 @@ macro_rules! mock_db_method { ($name:ident, $type:ident, $result:ty) => { fn $name(&self, _params: params::$type) -> DbFuture<$result> { let result: $result = Default::default(); - Box::new(future::ok(result)) + Box::pin(future::ok(result)) } }; } impl Db for MockDb { fn commit(&self) -> DbFuture<()> { - Box::new(future::ok(())) + Box::pin(future::ok(())) } fn rollback(&self) -> DbFuture<()> { - Box::new(future::ok(())) + Box::pin(future::ok(())) } fn box_clone(&self) -> Box { @@ -58,7 +58,7 @@ impl Db for MockDb { } fn check(&self) -> DbFuture { - Box::new(future::ok(true)) + Box::pin(future::ok(true)) } mock_db_method!(lock_for_read, LockCollection); diff --git a/src/db/mod.rs b/src/db/mod.rs index f021c33609..c5e0e44894 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -10,7 +10,7 @@ pub mod util; use std::fmt::Debug; -use futures::future::Future; +use futures::future::{self, LocalBoxFuture, TryFutureExt}; use lazy_static::lazy_static; use serde::Deserialize; use url::Url; @@ -55,7 +55,7 @@ pub const BATCH_LIFETIME: i64 = 2 * 60 * 60 * 1000; // 2 hours, in milliseconds /// DbPools' worker ThreadPool size pub const DB_THREAD_POOL_SIZE: usize = 50; -type DbFuture = Box>; +type DbFuture = LocalBoxFuture<'static, Result>; pub trait DbPool: Sync + Send + Debug { fn get(&self) -> DbFuture>; @@ -161,28 +161,28 @@ pub trait Db: Send + Debug { // If there's no collection, we return the overall storage timestamp let collection = match collection { Some(collection) => collection, - None => return Box::new(self.get_storage_timestamp(user_id)), + None => return Box::pin(self.get_storage_timestamp(user_id)), }; // If there's no bso, return the collection let bso = match bso { Some(bso) => bso, None => { - return Box::new( + return Box::pin( self.get_collection_timestamp(params::GetCollectionTimestamp { user_id, collection, }) .or_else(|e| { if e.is_collection_not_found() { - Ok(SyncTimestamp::from_seconds(0f64)) + future::ok(SyncTimestamp::from_seconds(0f64)) } else { - Err(e) + future::err(e) } }), ) } }; - Box::new( + Box::pin( self.get_bso_timestamp(params::GetBsoTimestamp { user_id, collection, @@ -190,9 +190,9 @@ pub trait Db: Send + Debug { }) .or_else(|e| { if e.is_collection_not_found() { - Ok(SyncTimestamp::from_seconds(0f64)) + future::ok(SyncTimestamp::from_seconds(0f64)) } else { - Err(e) + future::err(e) } }), ) diff --git a/src/db/mysql/models.rs b/src/db/mysql/models.rs index aeedb3d482..1c15e8e1ca 100644 --- a/src/db/mysql/models.rs +++ b/src/db/mysql/models.rs @@ -1,3 +1,7 @@ +use actix_web::web::block; + +use futures::future::TryFutureExt; + use std::{self, cell::RefCell, collections::HashMap, fmt, ops::Deref, sync::Arc}; use diesel::{ @@ -13,7 +17,6 @@ use diesel::{ }; #[cfg(any(test, feature = "db_test"))] use diesel_logger::LoggingConnection; -use futures::{future, lazy}; use super::{ batch, @@ -68,7 +71,7 @@ struct MysqlDbSession { #[derive(Clone, Debug)] pub struct MysqlDb { - /// Synchronous Diesel calls are executed in a tokio ThreadPool to satisfy + /// Synchronous Diesel calls are executed in actix_web::web::block to satisfy /// the Db trait's asynchronous interface. /// /// Arc provides a Clone impl utilized for safely moving to @@ -95,8 +98,6 @@ pub struct MysqlDbInner { pub(super) conn: LoggingConnection, session: RefCell, - - thread_pool: Arc<::tokio_threadpool::ThreadPool>, } impl fmt::Debug for MysqlDbInner { @@ -114,19 +115,13 @@ impl Deref for MysqlDb { } impl MysqlDb { - pub fn new( - conn: Conn, - thread_pool: Arc<::tokio_threadpool::ThreadPool>, - coll_cache: Arc, - metrics: &Metrics, - ) -> Self { + pub fn new(conn: Conn, coll_cache: Arc, metrics: &Metrics) -> Self { let inner = MysqlDbInner { #[cfg(not(any(test, feature = "db_test")))] conn, #[cfg(any(test, feature = "db_test"))] conn: LoggingConnection::new(conn), session: RefCell::new(Default::default()), - thread_pool, }; MysqlDb { inner: Arc::new(inner), @@ -885,9 +880,9 @@ macro_rules! sync_db_method { ($name:ident, $sync_name:ident, $type:ident, $result:ty) => { fn $name(&self, params: params::$type) -> DbFuture<$result> { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.$sync_name(params).map_err(Into::into)) - }))) + Box::pin(block(move || { + db.$sync_name(params).map_err(Into::into) + }).map_err(Into::into)) } }; } @@ -895,16 +890,12 @@ macro_rules! sync_db_method { impl Db for MysqlDb { fn commit(&self) -> DbFuture<()> { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.commit_sync().map_err(Into::into)) - }))) + Box::pin(block(move || db.commit_sync().map_err(Into::into)).map_err(Into::into)) } fn rollback(&self) -> DbFuture<()> { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.rollback_sync().map_err(Into::into)) - }))) + Box::pin(block(move || db.rollback_sync().map_err(Into::into)).map_err(Into::into)) } fn box_clone(&self) -> Box { @@ -913,9 +904,7 @@ impl Db for MysqlDb { fn check(&self) -> DbFuture { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.check_sync().map_err(Into::into)) - }))) + Box::pin(block(move || db.check_sync().map_err(Into::into)).map_err(Into::into)) } sync_db_method!(lock_for_read, lock_for_read_sync, LockCollection); @@ -979,28 +968,25 @@ impl Db for MysqlDb { #[cfg(any(test, feature = "db_test"))] fn get_collection_id(&self, name: String) -> DbFuture { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.get_collection_id(&name).map_err(Into::into)) - }))) + Box::pin(block(move || db.get_collection_id(&name).map_err(Into::into)).map_err(Into::into)) } #[cfg(any(test, feature = "db_test"))] fn create_collection(&self, name: String) -> DbFuture { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.create_collection(&name).map_err(Into::into)) - }))) + Box::pin(block(move || db.create_collection(&name).map_err(Into::into)).map_err(Into::into)) } #[cfg(any(test, feature = "db_test"))] fn touch_collection(&self, param: params::TouchCollection) -> DbFuture { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result( + Box::pin( + block(move || { db.touch_collection(param.user_id.legacy_id as u32, param.collection_id) - .map_err(Into::into), - ) - }))) + .map_err(Into::into) + }) + .map_err(Into::into), + ) } #[cfg(any(test, feature = "db_test"))] diff --git a/src/db/mysql/pool.rs b/src/db/mysql/pool.rs index 254251ec4e..5173ada758 100644 --- a/src/db/mysql/pool.rs +++ b/src/db/mysql/pool.rs @@ -1,3 +1,7 @@ +use actix_web::web::block; + +use futures::future::TryFutureExt; + use std::{ collections::HashMap, fmt, @@ -9,13 +13,11 @@ use diesel::{ r2d2::{ConnectionManager, Pool}, Connection, }; -use futures::future::lazy; -use tokio_threadpool::ThreadPool; use super::models::{MysqlDb, Result}; #[cfg(any(test, feature = "db_test"))] use super::test::TestTransactionCustomizer; -use crate::db::{error::DbError, Db, DbFuture, DbPool, DB_THREAD_POOL_SIZE, STD_COLLS}; +use crate::db::{error::DbError, Db, DbFuture, DbPool, STD_COLLS}; use crate::server::metrics::Metrics; use crate::settings::Settings; @@ -35,7 +37,6 @@ pub struct MysqlDbPool { /// Pool of db connections pool: Pool>, /// Thread Pool for running synchronous db calls - thread_pool: Arc, /// In-memory cache of collection_ids and their names coll_cache: Arc, @@ -62,18 +63,8 @@ impl MysqlDbPool { builder }; - // XXX: tokio_threadpool:ThreadPool probably not the best option: db - // calls are longerish running/blocking, so should likely run on - // ThreadPool's "backup threads", but it defaults scheduling to its - // "worker threads" - // XXX: allow configuring the ThreadPool size Ok(Self { pool: builder.build(manager)?, - thread_pool: Arc::new( - tokio_threadpool::Builder::new() - .pool_size(DB_THREAD_POOL_SIZE) - .build(), - ), coll_cache: Default::default(), metrics: metrics.clone(), }) @@ -82,7 +73,6 @@ impl MysqlDbPool { pub fn get_sync(&self) -> Result { Ok(MysqlDb::new( self.pool.get()?, - Arc::clone(&self.thread_pool), Arc::clone(&self.coll_cache), &self.metrics, )) @@ -92,11 +82,14 @@ impl MysqlDbPool { impl DbPool for MysqlDbPool { fn get(&self) -> DbFuture> { let pool = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - pool.get_sync() - .map(|db| Box::new(db) as Box) - .map_err(Into::into) - }))) + Box::pin( + block(move || { + pool.get_sync() + .map(|db| Box::new(db) as Box) + .map_err(Into::into) + }) + .map_err(Into::into), + ) } fn box_clone(&self) -> Box { diff --git a/src/db/spanner/models.rs b/src/db/spanner/models.rs index 617788097b..2e12ce94ca 100644 --- a/src/db/spanner/models.rs +++ b/src/db/spanner/models.rs @@ -1,5 +1,5 @@ -use futures::future; -use futures::lazy; +use actix_web::web::block; +use futures::future::TryFutureExt; use diesel::r2d2::PooledConnection; @@ -101,7 +101,6 @@ pub struct SpannerDb { pub struct SpannerDbInner { pub(super) conn: Conn, - thread_pool: Arc<::tokio_threadpool::ThreadPool>, session: RefCell, } @@ -128,15 +127,9 @@ macro_rules! batch_db_method { } impl SpannerDb { - pub fn new( - conn: Conn, - thread_pool: Arc<::tokio_threadpool::ThreadPool>, - coll_cache: Arc, - metrics: &Metrics, - ) -> Self { + pub fn new(conn: Conn, coll_cache: Arc, metrics: &Metrics) -> Self { let inner = SpannerDbInner { conn, - thread_pool, session: RefCell::new(Default::default()), }; SpannerDb { @@ -1416,10 +1409,10 @@ impl SpannerDb { as_value(bso.payload.unwrap_or_else(|| "".to_owned())), ); let now_millis = timestamp.as_i64(); - let ttl = bso - .ttl - .map_or(i64::from(DEFAULT_BSO_TTL), |ttl| ttl.try_into().unwrap()) - * 1000; + let ttl = bso.ttl.map_or(i64::from(DEFAULT_BSO_TTL), |ttl| { + ttl.try_into() + .expect("Could not get ttl in put_bso_sync (test)") + }) * 1000; let expirystring = to_rfc3339(now_millis + ttl)?; debug!( "!!!!! INSERT expirystring:{:?}, timestamp:{:?}, ttl:{:?}", @@ -1500,9 +1493,9 @@ macro_rules! sync_db_method { ($name:ident, $sync_name:ident, $type:ident, $result:ty) => { fn $name(&self, params: params::$type) -> DbFuture<$result> { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.$sync_name(params).map_err(Into::into)) - }))) + Box::pin(block(move || { + db.$sync_name(params).map_err(Into::into) + }).map_err(Into::into)) } }; } @@ -1510,16 +1503,12 @@ macro_rules! sync_db_method { impl Db for SpannerDb { fn commit(&self) -> DbFuture<()> { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.commit_sync().map_err(Into::into)) - }))) + Box::pin(block(move || db.commit_sync().map_err(Into::into)).map_err(Into::into)) } fn rollback(&self) -> DbFuture<()> { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.rollback_sync().map_err(Into::into)) - }))) + Box::pin(block(move || db.rollback_sync().map_err(Into::into)).map_err(Into::into)) } fn box_clone(&self) -> Box { @@ -1528,9 +1517,7 @@ impl Db for SpannerDb { fn check(&self) -> DbFuture { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.check_sync().map_err(Into::into)) - }))) + Box::pin(block(move || db.check_sync().map_err(Into::into)).map_err(Into::into)) } sync_db_method!(lock_for_read, lock_for_read_sync, LockCollection); @@ -1594,28 +1581,25 @@ impl Db for SpannerDb { #[cfg(any(test, feature = "db_test"))] fn get_collection_id(&self, name: String) -> DbFuture { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.get_collection_id(&name).map_err(Into::into)) - }))) + Box::pin(block(move || db.get_collection_id(&name).map_err(Into::into)).map_err(Into::into)) } #[cfg(any(test, feature = "db_test"))] fn create_collection(&self, name: String) -> DbFuture { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result(db.create_collection(&name).map_err(Into::into)) - }))) + Box::pin(block(move || db.create_collection(&name).map_err(Into::into)).map_err(Into::into)) } #[cfg(any(test, feature = "db_test"))] fn touch_collection(&self, param: params::TouchCollection) -> DbFuture { let db = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - future::result( + Box::pin( + block(move || { db.touch_collection(¶m.user_id, param.collection_id) - .map_err(Into::into), - ) - }))) + .map_err(Into::into) + }) + .map_err(Into::into), + ) } #[cfg(any(test, feature = "db_test"))] diff --git a/src/db/spanner/pool.rs b/src/db/spanner/pool.rs index 256877c3f5..a0f6c41ad1 100644 --- a/src/db/spanner/pool.rs +++ b/src/db/spanner/pool.rs @@ -1,3 +1,6 @@ +use actix_web::web::block; +use futures::future::TryFutureExt; + use std::{ collections::HashMap, fmt, @@ -7,9 +10,7 @@ use std::{ use diesel::r2d2; use diesel::r2d2::Pool; -use futures::future::lazy; use scheduled_thread_pool::ScheduledThreadPool; -use tokio_threadpool::ThreadPool; use super::models::Result; #[cfg(any(test, feature = "db_test"))] @@ -36,8 +37,6 @@ embed_migrations!(); pub struct SpannerDbPool { /// Pool of db connections pool: Pool, - /// Thread Pool for running synchronous db calls - thread_pool: Arc, /// In-memory cache of collection_ids and their names coll_cache: Arc, @@ -76,11 +75,6 @@ impl SpannerDbPool { Ok(Self { pool: builder.build(manager)?, - thread_pool: Arc::new( - tokio_threadpool::Builder::new() - .pool_size(max_size as usize) - .build(), - ), coll_cache: Default::default(), metrics, }) @@ -89,7 +83,6 @@ impl SpannerDbPool { pub fn get_sync(&self) -> Result { Ok(SpannerDb::new( self.pool.get()?, - Arc::clone(&self.thread_pool), Arc::clone(&self.coll_cache), &self.metrics, )) @@ -99,11 +92,14 @@ impl SpannerDbPool { impl DbPool for SpannerDbPool { fn get(&self) -> DbFuture> { let pool = self.clone(); - Box::new(self.thread_pool.spawn_handle(lazy(move || { - pool.get_sync() - .map(|db| Box::new(db) as Box) - .map_err(Into::into) - }))) + Box::pin( + block(move || { + pool.get_sync() + .map(|db| Box::new(db) as Box) + .map_err(Into::into) + }) + .map_err(Into::into), + ) } fn box_clone(&self) -> Box { diff --git a/src/db/spanner/support.rs b/src/db/spanner/support.rs index 52ac854773..ba0c1f2249 100644 --- a/src/db/spanner/support.rs +++ b/src/db/spanner/support.rs @@ -1,10 +1,13 @@ use std::{ + cell::RefCell, collections::{HashMap, VecDeque}, fmt, mem, result::Result as StdResult, }; -use futures::stream::{Stream, Wait}; +use actix_rt::{System, SystemRunner}; +use futures::compat::{Compat01As03, Stream01CompatExt}; +use futures::stream::{StreamExt, StreamFuture}; use googleapis_raw::spanner::v1::{ result_set::{PartialResultSet, ResultSetMetadata, ResultSetStats}, spanner::ExecuteSqlRequest, @@ -118,11 +121,11 @@ impl ExecuteSqlRequestBuilder { /// Streams results from an ExecuteStreamingSql PartialResultSet /// -/// Utilizies futures 0.1 `wait()`, so should *always* be called from a thread +/// Utilizies block_on, so should *always* be called from a thread /// outside of an event loop pub struct StreamedResultSet { /// Stream from execute_streaming_sql - stream: Wait>, + stream: Option>>>, metadata: Option, stats: Option, @@ -135,11 +138,16 @@ pub struct StreamedResultSet { pending_chunk: Option, } +thread_local! { + static SYSTEM: RefCell = { + RefCell::new(System::new("syncstorage")) + }; +} + impl StreamedResultSet { pub fn new(stream: ClientSStreamReceiver) -> Self { Self { - // Note: wait() isn't futures 0.3 compatible - stream: stream.wait(), + stream: Some(stream.compat().into_future()), metadata: None, stats: None, rows: Default::default(), @@ -188,7 +196,15 @@ impl StreamedResultSet { /// /// Returns false when the stream is finished fn consume_next(&mut self) -> Result { - let mut partial_rs = if let Some(result) = self.stream.next() { + let (result, stream) = SYSTEM.with(|system| { + system.borrow_mut().block_on( + self.stream + .take() + .expect("Could not get next stream element"), + ) + }); + self.stream = Some(stream.into_future()); + let mut partial_rs = if let Some(result) = result { result? } else { // Stream finished diff --git a/src/error.rs b/src/error.rs index 47e8ef9037..26b5bc4da8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -4,6 +4,8 @@ // this cascades into Failure requiring std::error::Error being implemented // which is out of scope. #![allow(clippy::single_match, clippy::large_enum_variant)] + +use std::convert::From; use std::fmt; use actix_web::{ @@ -155,6 +157,17 @@ impl ApiError { } } +impl From> for ApiError { + fn from(inner: actix_web::error::BlockingError) -> Self { + match inner { + actix_web::error::BlockingError::Error(e) => e, + actix_web::error::BlockingError::Canceled => { + ApiErrorKind::Internal("Db threadpool operation canceled".to_owned()).into() + } + } + } +} + impl From for HttpResponse { fn from(inner: ApiError) -> Self { ResponseError::error_response(&inner) @@ -189,11 +202,6 @@ impl From> for ApiError { } impl ResponseError for ApiError { - // Override the default which will force "text/plain" and use the error message. - fn render_response(&self) -> HttpResponse { - self.error_response() - } - fn error_response(&self) -> HttpResponse { // To return a descriptive error response, this would work. We do not // unfortunately do that so that we can retain Sync 1.1 backwards compatibility diff --git a/src/main.rs b/src/main.rs index 8016ba469f..3c24b45917 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,7 +23,8 @@ struct Args { flag_config: Option, } -fn main() -> Result<(), Box> { +#[actix_rt::main] +async fn main() -> Result<(), Box> { let args: Args = Docopt::new(USAGE) .and_then(|d| d.deserialize()) .unwrap_or_else(|e| e.exit()); @@ -49,9 +50,9 @@ fn main() -> Result<(), Box> { // Setup and run the server let banner = settings.banner(); - let sys = server::Server::with_settings(settings).unwrap(); + let server = server::Server::with_settings(settings).unwrap(); info!("Server running on {}", banner); - sys.run()?; + server.await?; info!("Server closing"); logging::reset_logging(); diff --git a/src/server/metrics.rs b/src/server/metrics.rs index 4bd6792a79..12ebf6ce8d 100644 --- a/src/server/metrics.rs +++ b/src/server/metrics.rs @@ -1,7 +1,7 @@ use std::net::UdpSocket; use std::time::Instant; -use actix_web::{error::ErrorInternalServerError, Error, HttpRequest}; +use actix_web::{error::ErrorInternalServerError, web::Data, Error, HttpRequest}; use cadence::{ BufferedUdpMetricSink, Counted, Metric, NopMetricSink, QueuingMetricSink, StatsdClient, Timed, }; @@ -65,7 +65,7 @@ impl From<&HttpRequest> for Metrics { let def_tags = Tags::from_request_head(req.head()); let tags = exts.get::().unwrap_or_else(|| &def_tags); Metrics { - client: match req.app_data::() { + client: match req.app_data::>() { Some(v) => Some(*v.metrics.clone()), None => { warn!("⚠️ metric error: No App State"); @@ -168,9 +168,9 @@ impl Metrics { pub fn metrics_from_req(req: &HttpRequest) -> Result, Error> { Ok(req - .app_data::() + .app_data::>() .ok_or_else(|| ErrorInternalServerError("Could not get state")) - .unwrap() + .expect("Could not get state in metrics_from_req") .metrics .clone()) } diff --git a/src/server/mod.rs b/src/server/mod.rs index 961db9123d..af7bed3795 100644 --- a/src/server/mod.rs +++ b/src/server/mod.rs @@ -3,10 +3,9 @@ use std::sync::Arc; use actix_cors::Cors; -use actix_rt::{System, SystemRunner}; use actix_web::{ - http::StatusCode, middleware::errhandlers::ErrorHandlers, web, App, HttpRequest, HttpResponse, - HttpServer, + dev, http::StatusCode, middleware::errhandlers::ErrorHandlers, web, App, HttpRequest, + HttpResponse, HttpServer, }; // use num_cpus; use crate::db::{pool_from_settings, DbPool}; @@ -72,66 +71,60 @@ macro_rules! build_app { .wrap(Cors::default()) .service( web::resource(&cfg_path("/info/collections")) - .route(web::get().to_async(handlers::get_collections)), + .route(web::get().to(handlers::get_collections)), ) .service( web::resource(&cfg_path("/info/collection_counts")) - .route(web::get().to_async(handlers::get_collection_counts)), + .route(web::get().to(handlers::get_collection_counts)), ) .service( web::resource(&cfg_path("/info/collection_usage")) - .route(web::get().to_async(handlers::get_collection_usage)), + .route(web::get().to(handlers::get_collection_usage)), ) .service( web::resource(&cfg_path("/info/configuration")) - .route(web::get().to_async(handlers::get_configuration)), + .route(web::get().to(handlers::get_configuration)), ) .service( - web::resource(&cfg_path("/info/quota")) - .route(web::get().to_async(handlers::get_quota)), + web::resource(&cfg_path("/info/quota")).route(web::get().to(handlers::get_quota)), ) + .service(web::resource(&cfg_path("")).route(web::delete().to(handlers::delete_all))) .service( - web::resource(&cfg_path("")).route(web::delete().to_async(handlers::delete_all)), - ) - .service( - web::resource(&cfg_path("/storage")) - .route(web::delete().to_async(handlers::delete_all)), + web::resource(&cfg_path("/storage")).route(web::delete().to(handlers::delete_all)), ) .service( web::resource(&cfg_path("/storage/{collection}")) - .data( + .app_data( // Declare the payload limit for "normal" collections. web::PayloadConfig::new($limits.max_request_bytes as usize), ) - .data( + .app_data( // Declare the payload limits for "JSON" payloads // (Specify "text/plain" for legacy client reasons) web::JsonConfig::default() .limit($limits.max_request_bytes as usize) .content_type(|ct| ct == mime::TEXT_PLAIN), ) - .route(web::delete().to_async(handlers::delete_collection)) - .route(web::get().to_async(handlers::get_collection)) - .route(web::post().to_async(handlers::post_collection)), + .route(web::delete().to(handlers::delete_collection)) + .route(web::get().to(handlers::get_collection)) + .route(web::post().to(handlers::post_collection)), ) .service( web::resource(&cfg_path("/storage/{collection}/{bso}")) - .data(web::PayloadConfig::new($limits.max_request_bytes as usize)) - .data( + .app_data(web::PayloadConfig::new($limits.max_request_bytes as usize)) + .app_data( web::JsonConfig::default() .limit($limits.max_request_bytes as usize) .content_type(|ct| ct == mime::TEXT_PLAIN), ) - .route(web::delete().to_async(handlers::delete_bso)) - .route(web::get().to_async(handlers::get_bso)) - .route(web::put().to_async(handlers::put_bso)), + .route(web::delete().to(handlers::delete_bso)) + .route(web::get().to(handlers::get_bso)) + .route(web::put().to(handlers::put_bso)), ) // Dockerflow // Remember to update .::web::middleware::DOCKER_FLOW_ENDPOINTS // when applying changes to endpoint names. - .service( - web::resource("/__heartbeat__").route(web::get().to_async(handlers::heartbeat)), - ) + .service(web::resource("/__heartbeat__").route(web::get().to(handlers::heartbeat))) .service( web::resource("/__lbheartbeat__").route(web::get().to(|_: HttpRequest| { // used by the load balancers, just return OK. @@ -149,20 +142,19 @@ macro_rules! build_app { .body(include_str!("../../version.json")) })), ) - .service(web::resource("/__error__").route(web::get().to_async(handlers::test_error))) + .service(web::resource("/__error__").route(web::get().to(handlers::test_error))) }; } impl Server { - pub fn with_settings(settings: Settings) -> Result { - let sys = System::new("syncserver"); + pub fn with_settings(settings: Settings) -> Result { let metrics = metrics::metrics_from_opts(&settings)?; let db_pool = pool_from_settings(&settings, &Metrics::from(&metrics))?; let limits = Arc::new(settings.limits); let secrets = Arc::new(settings.master_secret); let port = settings.port; - HttpServer::new(move || { + let server = HttpServer::new(move || { // Setup the server state let state = ServerState { db_pool: db_pool.clone(), @@ -175,8 +167,8 @@ impl Server { build_app!(state, limits) }) .bind(format!("{}:{}", settings.host, settings.port)) - .unwrap() - .start(); - Ok(sys) + .expect("Could not get Server in Server::with_settings") + .run(); + Ok(server) } } diff --git a/src/server/test.rs b/src/server/test.rs index 0efed91498..24c451527b 100644 --- a/src/server/test.rs +++ b/src/server/test.rs @@ -1,10 +1,14 @@ use std::collections::HashMap; -use actix_service::Service; -use actix_web::{http, http::StatusCode, test}; +use actix_web::{ + dev::Service, + http::{self, HeaderName, HeaderValue, StatusCode}, + test, +}; use base64; use bytes::Bytes; use chrono::offset::Utc; +use futures::executor::block_on; use hawk::{self, Credentials, Key, RequestBuilder}; use hkdf::Hkdf; use hmac::{Hmac, Mac}; @@ -27,30 +31,28 @@ use crate::web::extractors::BsoBody; lazy_static! { static ref SERVER_LIMITS: Arc = Arc::new(ServerLimits::default()); - static ref SECRETS: Arc = Arc::new(Secrets::new("foo").unwrap()); + static ref SECRETS: Arc = + Arc::new(Secrets::new("foo").expect("Could not get Secrets in server/test.rs")); } const TEST_HOST: &str = "localhost"; const TEST_PORT: u16 = 8080; fn get_test_settings() -> Settings { - let settings = Settings::with_env_and_config_file(&None).unwrap(); + let settings = Settings::with_env_and_config_file(&None) + .expect("Could not get Settings in get_test_settings"); let treq = test::TestRequest::with_uri("/").to_http_request(); - let port = treq - .uri() - .port_part() - .map(|p| p.as_u16()) - .unwrap_or(TEST_PORT); + let port = treq.uri().port_u16().unwrap_or(TEST_PORT); // Make sure that our poolsize is >= the let host = treq.uri().host().unwrap_or(TEST_HOST).to_owned(); let pool_size = u32::from_str( std::env::var_os("RUST_TEST_THREADS") .unwrap_or_else(|| std::ffi::OsString::from("10")) .into_string() - .unwrap() + .expect("Could not get RUST_TEST_THREADS in get_test_settings") .as_str(), ) - .unwrap(); + .expect("Could not get pool_size in get_test_settings"); Settings { debug: true, port, @@ -67,7 +69,8 @@ fn get_test_settings() -> Settings { fn get_test_state(settings: &Settings) -> ServerState { let metrics = Metrics::sink(); ServerState { - db_pool: pool_from_settings(&settings, &Metrics::from(&metrics)).unwrap(), + db_pool: pool_from_settings(&settings, &Metrics::from(&metrics)) + .expect("Could not get db_pool in get_test_state"), limits: Arc::clone(&SERVER_LIMITS), secrets: Arc::clone(&SECRETS), metrics: Box::new(metrics), @@ -80,7 +83,7 @@ fn create_request( path: &str, headers: Option>, payload: Option, -) -> actix_http::Request { +) -> test::TestRequest { let settings = get_test_settings(); let mut req = test::TestRequest::with_uri(path) .method(method.clone()) @@ -99,12 +102,13 @@ fn create_request( if let Some(h) = headers { for (k, v) in h { let ln = String::from(k).to_lowercase(); - let hn = actix_http::http::HeaderName::from_lowercase(ln.as_bytes()).unwrap(); - let hv = actix_http::http::HeaderValue::from_str(v.as_str()).unwrap(); + let hn = HeaderName::from_lowercase(ln.as_bytes()) + .expect("Could not get hn in create_request"); + let hv = HeaderValue::from_str(v.as_str()).expect("Could not get hv in create_request"); req = req.header(hn, hv); } } - req.to_request() + req } fn create_hawk_header(method: &str, port: u16, path: &str) -> String { @@ -120,8 +124,10 @@ fn create_hawk_header(method: &str, port: u16, path: &str) -> String { fxa_kid: "xxx_test".to_owned(), device_id: "xxx_test".to_owned(), }; - let payload = serde_json::to_string(&payload).unwrap(); - let mut signature: Hmac = Hmac::new_varkey(&SECRETS.signing_secret).unwrap(); + let payload = + serde_json::to_string(&payload).expect("Could not get payload in create_hawk_header"); + let mut signature: Hmac = Hmac::new_varkey(&SECRETS.signing_secret) + .expect("Could not get signature in create_hawk_header"); signature.input(payload.as_bytes()); let signature = signature.result().code(); let mut id: Vec = vec![]; @@ -137,16 +143,20 @@ fn create_hawk_header(method: &str, port: u16, path: &str) -> String { let request = RequestBuilder::new(method, host, port, path).request(); let credentials = Credentials { id, - key: Key::new(token_secret.as_bytes(), hawk::DigestAlgorithm::Sha256).unwrap(), + key: Key::new(token_secret.as_bytes(), hawk::DigestAlgorithm::Sha256) + .expect("Could not get key in create_hawk_header"), }; - let header = request.make_header(&credentials).unwrap(); + let header = request + .make_header(&credentials) + .expect("Could not get header in create_hawk_header"); format!("Hawk {}", header) } fn hkdf_expand_32(info: &[u8], salt: Option<&[u8]>, key: &[u8]) -> [u8; 32] { let mut result = [0u8; 32]; let hkdf = Hkdf::::new(salt, key); - hkdf.expand(info, &mut result).unwrap(); + hkdf.expand(info, &mut result) + .expect("Could not hkdf.expand in hkdf_expand_32"); result } @@ -158,16 +168,17 @@ fn test_endpoint( ) { let settings = get_test_settings(); let limits = Arc::new(settings.limits.clone()); - let mut app = test::init_service(build_app!(get_test_state(&settings), limits)); + let app = test::init_service(build_app!(get_test_state(&settings), limits)); - let req = create_request(method, path, None, None); - let sresp = test::block_on(app.call(req)).unwrap(); + let req = create_request(method, path, None, None).to_request(); + let mut app = block_on(app); + let sresp = block_on(app.call(req)).expect("Could not get sresp in test_endpoint"); match status { None => assert!(sresp.response().status().is_success()), Some(status) => assert!(sresp.response().status() == status), }; if let Some(x_body) = expected_body { - let body = test::read_body(sresp); + let body = block_on(test::read_body(sresp)); assert_eq!(body, x_body.as_bytes()); } } @@ -178,10 +189,11 @@ where { let settings = get_test_settings(); let limits = Arc::new(settings.limits.clone()); - let mut app = test::init_service(build_app!(get_test_state(&settings), limits)); + let app = test::init_service(build_app!(get_test_state(&settings), limits)); - let req = create_request(method, path, None, None); - let sresponse = match test::block_on(app.call(req)) { + let req = create_request(method, path, None, None).to_request(); + let mut app = block_on(app); + let sresponse = match block_on(app.call(req)) { Ok(v) => v, Err(e) => { panic!("test_endpoint_with_response: Block failed: {:?}", e); @@ -195,7 +207,7 @@ where sresponse.response() ); } - let body = test::read_body(sresponse); + let body = block_on(test::read_body(sresponse)); let result: T = match serde_json::from_slice(&body) { Ok(v) => v, Err(e) => { @@ -208,11 +220,13 @@ where fn test_endpoint_with_body(method: http::Method, path: &str, body: serde_json::Value) -> Bytes { let settings = get_test_settings(); let limits = Arc::new(settings.limits.clone()); - let mut app = test::init_service(build_app!(get_test_state(&settings), limits)); - let req = create_request(method, path, None, Some(body)); - let sresponse = test::block_on(app.call(req)).unwrap(); + let app = test::init_service(build_app!(get_test_state(&settings), limits)); + let req = create_request(method, path, None, Some(body)).to_request(); + let mut app = block_on(app); + let sresponse = + block_on(app.call(req)).expect("Could not get sresponse in test_endpoint_with_body"); assert!(sresponse.response().status().is_success()); - test::read_body(sresponse) + block_on(test::read_body(sresponse)) } #[test] @@ -251,7 +265,10 @@ fn configuration() { http::Method::GET, "/1.5/42/info/configuration", None, - Some(&serde_json::to_string(&ServerLimits::default()).unwrap()), + Some( + &serde_json::to_string(&ServerLimits::default()) + .expect("Could not serde_json::to_string in test_endpoint"), + ), ); } @@ -334,7 +351,8 @@ fn post_collection() { ttl: Some(31_536_000), }]); let bytes = test_endpoint_with_body(http::Method::POST, "/1.5/42/storage/bookmarks", res_body); - let result: PostBsos = serde_json::from_slice(&bytes.to_vec()).unwrap(); + let result: PostBsos = + serde_json::from_slice(&bytes.to_vec()).expect("Could not get result in post_collection"); assert!(result.modified >= start); assert_eq!(result.success.len(), 1); assert_eq!(result.failed.len(), 0); @@ -368,7 +386,7 @@ fn put_bso() { "/1.5/42/storage/bookmarks/wibble", json!(BsoBody::default()), ); - let result: PutBso = serde_json::from_slice(&bytes).unwrap(); + let result: PutBso = serde_json::from_slice(&bytes).expect("Could not get result in put_bso"); assert!(result >= start); } @@ -382,13 +400,15 @@ fn bsos_can_have_a_collection_field() { {"id": "2", "collection": "foo", "payload": "SomePayload"}, ]); let bytes = test_endpoint_with_body(http::Method::POST, "/1.5/42/storage/meta", bsos); - let result: PostBsos = serde_json::from_slice(&bytes.to_vec()).unwrap(); + let result: PostBsos = serde_json::from_slice(&bytes.to_vec()) + .expect("Could not get result in bsos_can_have_a_collection_field"); assert_eq!(result.success.len(), 2); assert_eq!(result.failed.len(), 0); let bytes = test_endpoint_with_body(http::Method::PUT, "/1.5/42/storage/meta/global", bso1); - let result: PutBso = serde_json::from_slice(&bytes).unwrap(); - assert!(result >= start); + let result2: PutBso = serde_json::from_slice(&bytes) + .expect("Could not get result2 in bsos_can_have_a_collection_field"); + assert!(result2 >= start); } #[test] @@ -396,7 +416,10 @@ fn invalid_content_type() { let path = "/1.5/42/storage/bookmarks/wibble"; let settings = get_test_settings(); let limits = Arc::new(settings.limits.clone()); - let mut app = test::init_service(build_app!(get_test_state(&settings), limits)); + let mut app = block_on(test::init_service(build_app!( + get_test_state(&settings), + limits + ))); let mut headers = HashMap::new(); headers.insert("Content-Type", "application/javascript".to_owned()); @@ -411,9 +434,10 @@ fn invalid_content_type() { ttl: Some(31_536_000), ..Default::default() })), - ); + ) + .to_request(); - let response = test::block_on(app.call(req)).unwrap(); + let response = block_on(app.call(req)).expect("Could not get response in invalid_content_type"); assert_eq!(response.status(), StatusCode::UNSUPPORTED_MEDIA_TYPE); @@ -430,17 +454,19 @@ fn invalid_content_type() { ttl: Some(31_536_000), ..Default::default() }])), - ); + ) + .to_request(); - let response = test::block_on(app.call(req)).unwrap(); - assert_eq!(response.status(), StatusCode::UNSUPPORTED_MEDIA_TYPE); + let response2 = + block_on(app.call(req)).expect("Could not get response2 in invalid_content_type"); + assert_eq!(response2.status(), StatusCode::UNSUPPORTED_MEDIA_TYPE); } #[test] fn invalid_batch_post() { let settings = get_test_settings(); let limits = Arc::new(settings.limits.clone()); - let mut app = test::init_service(build_app!(get_test_state(&settings), limits)); + let app = test::init_service(build_app!(get_test_state(&settings), limits)); let mut headers = HashMap::new(); headers.insert("accept", "application/json".to_owned()); @@ -452,10 +478,13 @@ fn invalid_batch_post() { {"id": "123", "payload": "xxx", "sortindex": 23}, {"id": "456", "payload": "xxxasdf", "sortindex": 23} ])), - ); + ) + .to_request(); - let response = test::block_on(app.call(req)).unwrap(); + let mut app = block_on(app); + let response = block_on(app.call(req)).expect("Could not get response in invalid_batch_post"); assert_eq!(response.status(), StatusCode::BAD_REQUEST); - let body = String::from_utf8(test::read_body(response).to_vec()).unwrap(); + let body = String::from_utf8(block_on(test::read_body(response)).to_vec()) + .expect("Could not get body in invalid_batch_post"); assert_eq!(body, "0"); } diff --git a/src/web/auth.rs b/src/web/auth.rs index 8254f432f3..f39d65a7bd 100644 --- a/src/web/auth.rs +++ b/src/web/auth.rs @@ -12,8 +12,8 @@ use serde_json; use sha2::Sha256; use time::Duration; -use actix_http::http::Uri; use actix_web::dev::ConnectionInfo; +use actix_web::http::Uri; use super::tags::Tags; use super::{ diff --git a/src/web/extractors.rs b/src/web/extractors.rs index fb8727f0b0..66f9175dfc 100644 --- a/src/web/extractors.rs +++ b/src/web/extractors.rs @@ -11,10 +11,12 @@ use actix_web::{ header::{qitem, Accept, ContentType, Header, HeaderMap}, Uri, }, - web::{Json, Query}, + web::{Data, Json, Query}, Error, FromRequest, HttpMessage, HttpRequest, }; -use futures::{future, Future}; + +use futures::future::{self, FutureExt, LocalBoxFuture, Ready, TryFutureExt}; + use lazy_static::lazy_static; use mime::STAR_STAR; use regex::Regex; @@ -103,8 +105,11 @@ impl BatchBsoBody { // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept, but some corners can absolutely be cut. // This will pull the first accepted content type listed, or the highest rated non-accepted type. fn get_accepted(req: &HttpRequest, accepted: &[&str], default: &'static str) -> String { - let mut candidates = Accept::parse(req) - .unwrap_or_else(|_| Accept(vec![qitem(mime::Mime::from_str(default).unwrap())])); + let mut candidates = Accept::parse(req).unwrap_or_else(|_| { + Accept(vec![qitem( + mime::Mime::from_str(default).expect("Could not get accept in get_accepted"), + )]) + }); if candidates.is_empty() { return default.to_owned(); } @@ -134,7 +139,7 @@ pub struct BsoBodies { impl FromRequest for BsoBodies { type Config = (); type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; /// Extract the BSO Bodies from the request /// @@ -150,7 +155,7 @@ impl FromRequest for BsoBodies { let ctype = match ContentType::parse(req) { Ok(v) => v, Err(e) => { - return Box::new(future::err( + return Box::pin(future::err( ValidationErrorKind::FromDetails( format!("Unreadable Content-Type: {:?}", e), RequestErrorLocation::Header, @@ -165,7 +170,7 @@ impl FromRequest for BsoBodies { debug!("content_type: {:?}", &content_type); if !ACCEPTED_CONTENT_TYPES.contains(&content_type.as_ref()) { - return Box::new(future::err( + return Box::pin(future::err( ValidationErrorKind::FromDetails( format!("Invalid Content-Type {:?}", content_type), RequestErrorLocation::Header, @@ -204,11 +209,11 @@ impl FromRequest for BsoBodies { let newlines: bool = content_type == "application/newlines"; // Grab the max sizes - let state = match req.app_data::() { + let state = match req.app_data::>() { Some(s) => s, None => { - error!("Could not load the app state"); - return Box::new(future::err( + error!("⚠️ Could not load the app state"); + return Box::pin(future::err( ValidationErrorKind::FromDetails( "Internal error".to_owned(), RequestErrorLocation::Unknown, @@ -314,7 +319,7 @@ impl FromRequest for BsoBodies { future::ok(BsoBodies { valid, invalid }) }); - Box::new(fut) + Box::pin(fut) } } @@ -338,14 +343,14 @@ pub struct BsoBody { impl FromRequest for BsoBody { type Config = (); type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { // Only try and parse the body if its a valid content-type let ctype = match ContentType::parse(req) { Ok(v) => v, Err(e) => { - return Box::new(future::err( + return Box::pin(future::err( ValidationErrorKind::FromDetails( format!("Unreadable Content-Type: {:?}", e), RequestErrorLocation::Header, @@ -358,7 +363,7 @@ impl FromRequest for BsoBody { }; let content_type = format!("{}/{}", ctype.type_(), ctype.subtype()); if !ACCEPTED_CONTENT_TYPES.contains(&content_type.as_ref()) { - return Box::new(future::err( + return Box::pin(future::err( ValidationErrorKind::FromDetails( "Invalid Content-Type".to_owned(), RequestErrorLocation::Header, @@ -368,11 +373,11 @@ impl FromRequest for BsoBody { .into(), )); } - let state = match req.app_data::() { + let state = match req.app_data::>() { Some(s) => s, None => { - error!("Could not load the app state"); - return Box::new(future::err( + error!("⚠️ Could not load the app state"); + return Box::pin(future::err( ValidationErrorKind::FromDetails( "Internal error".to_owned(), RequestErrorLocation::Unknown, @@ -428,7 +433,7 @@ impl FromRequest for BsoBody { future::ok(bso.into_inner()) }); - Box::new(fut) + Box::pin(fut) } } @@ -513,10 +518,10 @@ impl BsoParam { impl FromRequest for BsoParam { type Config = (); type Error = Error; - type Future = Result; + type Future = Ready>; fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future { - Self::extrude(req.head(), &mut req.extensions_mut()) + future::ready(Self::extrude(req.head(), &mut req.extensions_mut())) } } @@ -586,20 +591,25 @@ impl CollectionParam { impl FromRequest for CollectionParam { type Config = (); type Error = Error; - type Future = Result; + + type Future = LocalBoxFuture<'static, Result>; fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { - let tags = Tags::from_request(req, payload)?; - if let Some(collection) = Self::extrude(&req.uri(), &mut req.extensions_mut(), &tags)? { - Ok(collection) - } else { - Err(ValidationErrorKind::FromDetails( - "Missing Collection".to_owned(), - RequestErrorLocation::Path, - Some("collection".to_owned()), - Some(tags), - ))? - } + let fut = Tags::from_request(req, payload); + let req = req.clone(); + Box::pin(async move { + let tags = fut.await?; + if let Some(collection) = Self::extrude(&req.uri(), &mut req.extensions_mut(), &tags)? { + Ok(collection) + } else { + Err(ValidationErrorKind::FromDetails( + "Missing Collection".to_owned(), + RequestErrorLocation::Path, + Some("collection".to_owned()), + Some(tags), + ))? + } + }) } } @@ -617,27 +627,32 @@ pub struct MetaRequest { impl FromRequest for MetaRequest { type Config = (); type Error = Error; - type Future = Result; + type Future = LocalBoxFuture<'static, Result>; - fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { - // Call the precondition stuff to init database handles and what-not - let tags = { - let exts = req.extensions(); - match exts.get::() { - Some(t) => t.clone(), - None => Tags::from_request_head(req.head()), - } - }; - let user_id = HawkIdentifier::from_request(req, payload)?; - let db = extrude_db(&req.extensions())?; - Ok({ - MetaRequest { + fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future { + let req = req.clone(); + let mut payload = Payload::None; + async move { + // Call the precondition stuff to init database handles and what-not + let tags = { + let exts = req.extensions(); + match exts.get::() { + Some(t) => t.clone(), + None => Tags::from_request_head(req.head()), + } + }; + let user_id = HawkIdentifier::from_request(&req, &mut payload).await?; + let db = extrude_db(&req.extensions())?; + // Box::pin(future::ok({ + Ok(MetaRequest { user_id, db, - metrics: metrics::Metrics::from(req), + metrics: metrics::Metrics::from(&req), tags, - } - }) + }) + // })) + } + .boxed_local() } } @@ -664,45 +679,56 @@ pub struct CollectionRequest { impl FromRequest for CollectionRequest { type Config = (); type Error = Error; - type Future = Result; + type Future = LocalBoxFuture<'static, Result>; - fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { - let user_id = HawkIdentifier::from_request(req, payload)?; - let db = >::from_request(req, payload)?; - let query = BsoQueryParams::from_request(req, payload)?; - let collection = CollectionParam::from_request(req, payload)?.collection; - let tags = { - let exts = req.extensions(); - match exts.get::() { - Some(t) => t.clone(), - None => Tags::from_request_head(req.head()), - } - }; + fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future { + let req = req.clone(); + let mut payload = Payload::None; + async move { + let user_id = HawkIdentifier::from_request(&req, &mut payload).await?; + let db = >::from_request(&req, &mut payload).await?; + let query = BsoQueryParams::from_request(&req, &mut payload).await?; + let collection = CollectionParam::from_request(&req, &mut payload) + .await? + .collection; + let tags = { + let exts = req.extensions(); + match exts.get::() { + Some(t) => t.clone(), + None => Tags::from_request_head(req.head()), + } + }; - let accept = get_accepted(req, &ACCEPTED_CONTENT_TYPES, "application/json"); - let reply = match accept.as_str() { - "application/newlines" => ReplyFormat::Newlines, - "application/json" | "" => ReplyFormat::Json, - _ => { - return Err(ValidationErrorKind::FromDetails( - "Invalid accept".to_string(), - RequestErrorLocation::Header, - Some("accept".to_string()), - Some(tags), - ) - .into()); - } - }; + let accept = get_accepted(&req, &ACCEPTED_CONTENT_TYPES, "application/json"); + let reply = match accept.as_str() { + "application/newlines" => ReplyFormat::Newlines, + "application/json" | "" => ReplyFormat::Json, + _ => { + // return Box::pin(future::err(ValidationErrorKind::FromDetails( + return Err(ValidationErrorKind::FromDetails( + "Invalid accept".to_string(), + RequestErrorLocation::Header, + Some("accept".to_string()), + Some(tags), + ) + .into()); + // .into())); + } + }; - Ok(CollectionRequest { - collection, - db, - user_id, - query, - reply, - metrics: metrics::Metrics::from(req), - tags: Some(tags), - }) + // Box::pin(future::ok(CollectionRequest { + Ok(CollectionRequest { + collection, + db, + user_id, + query, + reply, + metrics: metrics::Metrics::from(&req), + tags: Some(tags), + }) + // })) + } + .boxed_local() } } @@ -722,7 +748,7 @@ pub struct CollectionPostRequest { impl FromRequest for CollectionPostRequest { type Config = (); type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; /// Extractor for Collection Posts (Batch BSO upload) /// @@ -732,50 +758,49 @@ impl FromRequest for CollectionPostRequest { /// - Any valid BSO's beyond `BATCH_MAX_RECORDS` are moved to invalid fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { let req = req.clone(); - let tags = match req.extensions().get::() { - Some(t) => t.clone(), - None => Tags::from_request_head(req.head()), - }; - let state = match req.app_data::() { - Some(s) => s, - None => { - error!("Could not load the app state"); - return Box::new(future::err( - ValidationErrorKind::FromDetails( + let mut payload = payload.take(); + Box::pin(async move { + let tags = match req.extensions().get::() { + Some(t) => t.clone(), + None => Tags::from_request_head(req.head()), + }; + let state = match req.app_data::>() { + Some(s) => s, + None => { + error!("⚠️ Could not load the app state"); + return Err(ValidationErrorKind::FromDetails( "Internal error".to_owned(), RequestErrorLocation::Unknown, Some("app_data".to_owned()), Some(tags), ) - .into(), - )); - } - }; + .into()); + } + }; - let max_post_records = i64::from(state.limits.max_post_records); - let fut = <( - HawkIdentifier, - Box, - CollectionParam, - BsoQueryParams, - BsoBodies, - )>::from_request(&req, payload) - .and_then(move |(user_id, db, collection, query, mut bsos)| { + let max_post_records = i64::from(state.limits.max_post_records); + let (user_id, db, collection, query, mut bsos) = + <( + HawkIdentifier, + Box, + CollectionParam, + BsoQueryParams, + BsoBodies, + )>::from_request(&req, &mut payload) + .await?; let collection = collection.collection; if collection == "crypto" { // Verify the client didn't mess up the crypto if we have a payload for bso in &bsos.valid { if let Some(ref data) = bso.payload { if KNOWN_BAD_PAYLOAD_REGEX.is_match(data) { - return future::err( - ValidationErrorKind::FromDetails( - "Known-bad BSO payload".to_owned(), - RequestErrorLocation::Body, - Some("bsos".to_owned()), - Some(tags), - ) - .into(), - ); + return Err(ValidationErrorKind::FromDetails( + "Known-bad BSO payload".to_owned(), + RequestErrorLocation::Body, + Some("bsos".to_owned()), + Some(tags), + ) + .into()); } } } @@ -792,12 +817,8 @@ impl FromRequest for CollectionPostRequest { } // XXX: let's not use extract here (maybe convert to extrude?) - let batch = match BatchRequestOpt::extract(&req) { - Ok(batch) => batch, - Err(e) => return future::err(e), - }; - - future::ok(CollectionPostRequest { + let batch = BatchRequestOpt::extract(&req).await?; + Ok(CollectionPostRequest { collection, db, user_id, @@ -806,9 +827,7 @@ impl FromRequest for CollectionPostRequest { batch: batch.opt, metrics: metrics::Metrics::from(&req), }) - }); - - Box::new(fut) + }) } } @@ -828,22 +847,28 @@ pub struct BsoRequest { impl FromRequest for BsoRequest { type Config = (); type Error = Error; - type Future = Result; + type Future = LocalBoxFuture<'static, Result>; fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { - let user_id = HawkIdentifier::from_request(req, payload)?; - let db = >::from_request(req, payload)?; - let query = BsoQueryParams::from_request(req, payload)?; - let collection = CollectionParam::from_request(req, payload)?.collection; - let bso = BsoParam::from_request(req, payload)?; - - Ok(BsoRequest { - collection, - db, - user_id, - query, - bso: bso.bso, - metrics: metrics::Metrics::from(req), + let req = req.clone(); + let mut payload = payload.take(); + Box::pin(async move { + let user_id = HawkIdentifier::from_request(&req, &mut payload).await?; + let db = >::from_request(&req, &mut payload).await?; + let query = BsoQueryParams::from_request(&req, &mut payload).await?; + let collection = CollectionParam::from_request(&req, &mut payload) + .await? + .collection; + let bso = BsoParam::from_request(&req, &mut payload).await?; + + Ok(BsoRequest { + collection, + db, + user_id, + query, + bso: bso.bso, + metrics: metrics::Metrics::from(&req), + }) }) } } @@ -864,7 +889,7 @@ pub struct BsoPutRequest { impl FromRequest for BsoPutRequest { type Config = (); type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { let metrics = metrics::Metrics::from(req); @@ -905,7 +930,7 @@ impl FromRequest for BsoPutRequest { metrics, }) }); - Box::new(fut) + Box::pin(fut) } } @@ -917,7 +942,7 @@ pub struct ConfigRequest { impl FromRequest for ConfigRequest { type Config = (); type Error = Error; - type Future = Result; + type Future = LocalBoxFuture<'static, Result>; fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future { let tags = { @@ -928,22 +953,24 @@ impl FromRequest for ConfigRequest { } }; - let state = match req.app_data::() { + let state = match req.app_data::>() { Some(s) => s, None => { - error!("Could not load the app state"); - return Err(ValidationErrorKind::FromDetails( - "Internal error".to_owned(), - RequestErrorLocation::Unknown, - Some("state".to_owned()), - Some(tags), - ) - .into()); + error!("⚠️ Could not load the app state"); + return Box::pin(future::err( + ValidationErrorKind::FromDetails( + "Internal error".to_owned(), + RequestErrorLocation::Unknown, + Some("state".to_owned()), + Some(tags), + ) + .into(), + )); } }; let data = &state.limits; - Ok(Self { + Box::pin(future::ok(Self { limits: ServerLimits { max_post_bytes: data.max_post_bytes, max_post_records: data.max_post_records, @@ -952,7 +979,7 @@ impl FromRequest for ConfigRequest { max_total_bytes: data.max_total_bytes, max_total_records: data.max_total_records, }, - }) + })) } } @@ -965,7 +992,7 @@ pub struct HeartbeatRequest { impl FromRequest for HeartbeatRequest { type Config = (); type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future { let headers = req.headers().clone(); @@ -977,11 +1004,11 @@ impl FromRequest for HeartbeatRequest { } }; - let state = match req.app_data::() { + let state = match req.app_data::>() { Some(s) => s, None => { - error!("Could not load the app state"); - return Box::new(future::err( + error!("⚠️ Could not load the app state"); + return Box::pin(future::err( ValidationErrorKind::FromDetails( "Internal error".to_owned(), RequestErrorLocation::Unknown, @@ -996,8 +1023,8 @@ impl FromRequest for HeartbeatRequest { .db_pool .get() .map_err(Into::into) - .and_then(|db| Ok(HeartbeatRequest { headers, db })); - Box::new(fut) + .and_then(|db| future::ok(HeartbeatRequest { headers, db })); + Box::pin(fut) } } @@ -1010,7 +1037,7 @@ pub struct TestErrorRequest { impl FromRequest for TestErrorRequest { type Config = (); type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future { let headers = req.headers().clone(); @@ -1022,7 +1049,7 @@ impl FromRequest for TestErrorRequest { } }; - Box::new(future::ok(TestErrorRequest { + Box::pin(future::ok(TestErrorRequest { headers, tags: Some(tags), })) @@ -1145,30 +1172,34 @@ impl HawkIdentifier { impl FromRequest for HawkIdentifier { type Config = (); type Error = Error; - type Future = Result; + type Future = LocalBoxFuture<'static, Result>; /// Use HawkPayload extraction and format as HawkIdentifier. - fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { - let tags = Tags::from_request(req, payload)?; - - let state = match req.app_data::() { - Some(s) => s, - None => { - error!("Could not load the app state"); - return Err(ValidationErrorKind::FromDetails( - "Internal error".to_owned(), - RequestErrorLocation::Unknown, - Some("state".to_owned()), - Some(tags), - ) - .into()); - } - }; - // NOTE: `connection_info()` will get a mutable reference lock on `extensions()` - let connection_info = req.connection_info().clone(); - let method = req.method().as_str(); - let uri = req.uri(); - Self::extrude(req, method, uri, &connection_info, &state, Some(tags)) + fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future { + let req = req.clone(); + let mut payload = Payload::None; + + Box::pin(async move { + let tags = Tags::from_request(&req, &mut payload).await?; + let state = match req.app_data::>() { + Some(s) => s, + None => { + error!("⚠️ Could not load the app state"); + return Err(ValidationErrorKind::FromDetails( + "Internal error".to_owned(), + RequestErrorLocation::Unknown, + Some("state".to_owned()), + Some(tags), + ) + .into()); + } + }; + // NOTE: `connection_info()` will get a mutable reference lock on `extensions()` + let connection_info = req.connection_info().clone(); + let method = req.method().as_str(); + let uri = req.uri(); + Self::extrude(&req, method, uri, &connection_info, &state, Some(tags)) + }) } } @@ -1191,10 +1222,10 @@ pub fn extrude_db(exts: &Extensions) -> Result, Error> { impl FromRequest for Box { type Config = (); type Error = Error; - type Future = Result; + type Future = LocalBoxFuture<'static, Result>; fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future { - extrude_db(&req.extensions()) + Box::pin(future::ready(extrude_db(&req.extensions()))) } } @@ -1276,56 +1307,35 @@ pub struct BsoQueryParams { impl FromRequest for BsoQueryParams { type Config = (); type Error = Error; - type Future = Result; + type Future = LocalBoxFuture<'static, Result>; /// Extract and validate the query parameters - fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { - let tags = Tags::from_request(req, payload)?; + fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future { + let req = req.clone(); + let mut payload = Payload::None; + Box::pin(async move { + let tags = Tags::from_request(&req, &mut payload).await?; - let params = Query::::from_request(req, payload) - .map_err(|e| { - ValidationErrorKind::FromDetails( - e.to_string(), + let params = Query::::from_request(&req, &mut payload) + .map_err(|e| { + ValidationErrorKind::FromDetails( + e.to_string(), + RequestErrorLocation::QueryString, + None, + Some(tags.clone()), + ) + }) + .await? + .into_inner(); + params.validate().map_err(|e| { + ValidationErrorKind::FromValidationErrors( + e, RequestErrorLocation::QueryString, - None, Some(tags.clone()), ) - })? - .into_inner(); - params.validate().map_err(|e| { - ValidationErrorKind::FromValidationErrors( - e, - RequestErrorLocation::QueryString, - Some(tags.clone()), - ) - })?; - if params.sort != Sorting::Index { - if let Some(timestamp) = params.offset.as_ref().and_then(|offset| offset.timestamp) { - let bound = timestamp.as_i64(); - if let Some(newer) = params.newer { - if bound < newer.as_i64() { - return Err(ValidationErrorKind::FromDetails( - format!("Invalid Offset {} {}", bound, newer.as_i64()), - RequestErrorLocation::QueryString, - Some("newer".to_owned()), - None, - ) - .into()); - } - } else if let Some(older) = params.older { - if bound > older.as_i64() { - return Err(ValidationErrorKind::FromDetails( - "Invalid Offset".to_owned(), - RequestErrorLocation::QueryString, - Some("older".to_owned()), - None, - ) - .into()); - } - } - } - } - Ok(params) + })?; + Ok(params) + }) } } @@ -1351,124 +1361,131 @@ pub struct BatchRequestOpt { impl FromRequest for BatchRequestOpt { type Config = (); type Error = Error; - type Future = Result; - - fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { - let tags = Tags::from_request(req, payload)?; - // let tags = Tags::from_request_head(req.head()); - let ftags = tags.clone(); - let params = Query::::from_request(req, payload) - .map_err(|e| { - ValidationErrorKind::FromDetails( - e.to_string(), - RequestErrorLocation::QueryString, - None, - Some(tags.clone()), - ) - })? - .into_inner(); - let state = match req.app_data::() { - Some(s) => s, - None => { - error!("Could not load the app state"); - return Err(ValidationErrorKind::FromDetails( - "Internal error".to_owned(), - RequestErrorLocation::Unknown, - Some("state".to_owned()), - Some(tags), - ) - .into()); - } - }; + type Future = LocalBoxFuture<'static, Result>; - let limits = &state.limits; + fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future { + let req = req.clone(); + let mut payload = Payload::None; + Box::pin(async move { + let tags = Tags::from_request(&req, &mut payload).await?; + // let tags = Tags::from_request_head(req.head()); + let ftags = tags.clone(); + let params = Query::::from_request(&req, &mut payload) + .map_err(|e| { + ValidationErrorKind::FromDetails( + e.to_string(), + RequestErrorLocation::QueryString, + None, + Some(tags.clone()), + ) + }) + .await? + .into_inner(); + let state = match req.app_data::>() { + Some(s) => s, + None => { + error!("⚠️ Could not load the app state"); + return Err(ValidationErrorKind::FromDetails( + "Internal error".to_owned(), + RequestErrorLocation::Unknown, + Some("state".to_owned()), + Some(tags), + ) + .into()); + } + }; - let checks = [ - (X_WEAVE_RECORDS, limits.max_post_records), - ("X-Weave-Bytes", limits.max_post_bytes), - ("X-Weave-Total-Records", limits.max_total_records), - ("X-Weave-Total-Bytes", limits.max_total_bytes), - ]; - for (header, limit) in &checks { - let value = match req.headers().get(*header) { - Some(value) => value.to_str().map_err(|e| { + let limits = &state.limits; + + let checks = [ + (X_WEAVE_RECORDS, limits.max_post_records), + ("X-Weave-Bytes", limits.max_post_bytes), + ("X-Weave-Total-Records", limits.max_total_records), + ("X-Weave-Total-Bytes", limits.max_total_bytes), + ]; + for (header, limit) in &checks { + let value = match req.headers().get(*header) { + Some(value) => value.to_str().map_err(|e| { + let err: ApiError = ValidationErrorKind::FromDetails( + e.to_string(), + RequestErrorLocation::Header, + Some((*header).to_owned()), + Some(tags.clone()), + ) + .into(); + err + })?, + None => continue, + }; + let count = value.parse::().map_err(|_| { let err: ApiError = ValidationErrorKind::FromDetails( - e.to_string(), + format!("Invalid integer value: {}", value), RequestErrorLocation::Header, Some((*header).to_owned()), Some(tags.clone()), ) .into(); err - })?, - None => continue, - }; - let count = value.parse::().map_err(|_| { - let err: ApiError = ValidationErrorKind::FromDetails( - format!("Invalid integer value: {}", value), - RequestErrorLocation::Header, - Some((*header).to_owned()), - Some(tags.clone()), - ) - .into(); - err - })?; - if count > *limit { + })?; + if count > *limit { + return Err(ValidationErrorKind::FromDetails( + "size-limit-exceeded".to_owned(), + RequestErrorLocation::Header, + None, + Some(tags.clone()), + ) + .into()); + } + } + + if params.batch.is_none() && params.commit.is_none() { + // No batch options requested + return Ok(Self { opt: None }); + } else if params.batch.is_none() { + // commit w/ no batch ID is an error return Err(ValidationErrorKind::FromDetails( - "size-limit-exceeded".to_owned(), - RequestErrorLocation::Header, + "Commit with no batch specified".to_string(), + RequestErrorLocation::Path, None, - Some(tags.clone()), + Some(tags), ) .into()); } - } - - if params.batch.is_none() && params.commit.is_none() { - // No batch options requested - return Ok(Self { opt: None }); - } else if params.batch.is_none() { - // commit w/ no batch ID is an error - return Err(ValidationErrorKind::FromDetails( - "Commit with no batch specified".to_string(), - RequestErrorLocation::Path, - None, - Some(tags), - ) - .into()); - } - params.validate().map_err(|e| { - ValidationErrorKind::FromValidationErrors( - e, - RequestErrorLocation::QueryString, - Some(tags.clone()), - ) - })?; + params.validate().map_err(|e| { + let err: ApiError = ValidationErrorKind::FromValidationErrors( + e, + RequestErrorLocation::QueryString, + Some(tags.clone()), + ) + .into(); + err + })?; - let id = match params.batch { - None => None, - Some(ref batch) if batch == "" || TRUE_REGEX.is_match(batch) => None, - Some(batch) => { - let db = extrude_db(&req.extensions())?; - if db.validate_batch_id(batch.clone()).is_err() { - return Err(ValidationErrorKind::FromDetails( - format!(r#"Invalid batch ID: "{}""#, batch), - RequestErrorLocation::QueryString, - Some("batch".to_owned()), - Some(ftags), - ) - .into()); + let id = match params.batch { + None => None, + Some(ref batch) if batch == "" || TRUE_REGEX.is_match(&batch) => None, + Some(batch) => { + let db = extrude_db(&req.extensions())?; + if db.validate_batch_id(batch.clone()).is_err() { + return Err(ValidationErrorKind::FromDetails( + format!(r#"Invalid batch ID: "{}""#, batch), + RequestErrorLocation::QueryString, + Some("batch".to_owned()), + Some(ftags), + ) + .into()); + } + Some(batch) } - Some(batch) - } - }; + }; - Ok(Self { - opt: Some(BatchRequest { - id, - commit: params.commit.is_some(), - }), + Ok(Self { + opt: Some(BatchRequest { + id, + commit: params.commit.is_some(), + }), + }) }) } } @@ -1564,12 +1581,16 @@ impl PreConditionHeaderOpt { impl FromRequest for PreConditionHeaderOpt { type Config = (); type Error = Error; - type Future = Result; + type Future = LocalBoxFuture<'static, Result>; /// Extract and validate the precondition headers - fn from_request(req: &HttpRequest, payload: &mut Payload) -> Self::Future { - let tags = Tags::from_request(req, payload)?; - Self::extrude(req.headers(), Some(tags)).map_err(Into::into) + fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future { + let req = req.clone(); + let mut payload = Payload::None; + Box::pin(async move { + let tags = Tags::from_request(&req, &mut payload).await?; + Self::extrude(req.headers(), Some(tags)).map_err(Into::into) + }) } } @@ -1707,6 +1728,9 @@ where #[cfg(test)] mod tests { + use actix_http::h1; + use futures::executor::block_on; + use super::*; use std::sync::Arc; @@ -1763,7 +1787,7 @@ mod tests { } fn extract_body_as_str(sresponse: ServiceResponse) -> String { - String::from_utf8(test::read_body(sresponse).to_vec()).unwrap() + String::from_utf8(block_on(test::read_body(sresponse)).to_vec()).unwrap() } fn create_valid_hawk_header( @@ -1799,7 +1823,10 @@ mod tests { format!("Hawk {}", request.make_header(&credentials).unwrap()) } - fn post_collection(qs: &str, body: &serde_json::Value) -> Result { + async fn post_collection( + qs: &str, + body: &serde_json::Value, + ) -> Result { let payload = HawkPayload::test_default(*USER_ID); let state = make_state(); let path = format!( @@ -1817,7 +1844,7 @@ mod tests { .header("authorization", header) .header("content-type", "application/json; charset=UTF-8") .header("accept", "application/json;q=0.9,/;q=0.2") - .set_payload(bod_str.as_bytes()) + .set_payload(bod_str.to_owned()) .param("uid", &USER_ID_STR) .param("collection", "tabs") .to_http_request(); @@ -1825,10 +1852,9 @@ mod tests { // Not sure why but sending req through *::extract loses the body. // Compose a payload here and call the *::from_request - let mut payload = actix_http::h1::Payload::empty(); - payload.unread_data(bytes::Bytes::from(bod_str.as_bytes())); - - CollectionPostRequest::from_request(&req, &mut payload.into()).wait() + let (_sender, mut payload) = h1::Payload::create(true); + payload.unread_data(bytes::Bytes::from(bod_str.to_owned())); + CollectionPostRequest::from_request(&req, &mut payload.into()).await } #[test] @@ -1837,7 +1863,7 @@ mod tests { let req = TestRequest::with_uri("/?lower=-1.23&sort=whatever") .data(state) .to_http_request(); - let result = BsoQueryParams::extract(&req); + let result = block_on(BsoQueryParams::extract(&req)); assert!(result.is_err()); let response: HttpResponse = result.err().unwrap().into(); assert_eq!(response.status(), 400); @@ -1900,7 +1926,7 @@ mod tests { let req = TestRequest::with_uri("/?ids=1,2&full=&sort=index&older=2.43") .data(make_state()) .to_http_request(); - let result = BsoQueryParams::extract(&req).unwrap(); + let result = block_on(BsoQueryParams::extract(&req)).unwrap(); assert_eq!(result.ids, vec!["1", "2"]); assert_eq!(result.sort, Sorting::Index); assert_eq!(result.older.unwrap(), SyncTimestamp::from_seconds(2.43)); @@ -1922,7 +1948,8 @@ mod tests { .param("bso", "asdf") .to_http_request(); req.extensions_mut().insert(make_db()); - let result = BsoRequest::extract(&req).unwrap(); + let result = block_on(BsoRequest::extract(&req)) + .expect("Could not get result in test_valid_bso_request"); assert_eq!(result.user_id.legacy_id, *USER_ID); assert_eq!(&result.collection, "tabs"); assert_eq!(&result.bso, "asdf"); @@ -1944,7 +1971,7 @@ mod tests { .param("bso", INVALID_BSO_NAME) .to_http_request(); req.extensions_mut().insert(make_db()); - let result = BsoRequest::extract(&req); + let result = block_on(BsoRequest::extract(&req)); assert!(result.is_err()); let response: HttpResponse = result.err().unwrap().into(); assert_eq!(response.status(), 400); @@ -1982,12 +2009,10 @@ mod tests { .param("bso", "asdf") .to_http_request(); req.extensions_mut().insert(make_db()); - let mut payload = actix_http::h1::Payload::empty(); - payload.unread_data(bytes::Bytes::from(bso_body.to_string().as_bytes())); - - let result = BsoPutRequest::from_request(&req, &mut payload.into()) - .wait() - .unwrap(); + let (_sender, mut payload) = h1::Payload::create(true); + payload.unread_data(bytes::Bytes::from(bso_body.to_string())); + let result = block_on(BsoPutRequest::from_request(&req, &mut payload.into())) + .expect("Could not get result in test_valid_bso_post_body"); assert_eq!(result.user_id.legacy_id, *USER_ID); assert_eq!(&result.collection, "tabs"); assert_eq!(&result.bso, "asdf"); @@ -2014,8 +2039,11 @@ mod tests { .param("bso", "asdf") .to_http_request(); req.extensions_mut().insert(make_db()); - let result = BsoPutRequest::extract(&req).wait(); - let response: HttpResponse = result.err().unwrap().into(); + let result = block_on(BsoPutRequest::extract(&req)); + let response: HttpResponse = result + .err() + .expect("Could not get response in test_invalid_bso_post_body") + .into(); assert_eq!(response.status(), 400); let body = extract_body_as_str(ServiceResponse::new(req, response)); assert_eq!(body, "8") @@ -2044,7 +2072,8 @@ mod tests { .param("collection", "tabs") .to_http_request(); req.extensions_mut().insert(make_db()); - let result = CollectionRequest::extract(&req).unwrap(); + let result = block_on(CollectionRequest::extract(&req)) + .expect("Could not get result in test_valid_collection_request"); assert_eq!(result.user_id.legacy_id, *USER_ID); assert_eq!(&result.collection, "tabs"); } @@ -2065,7 +2094,7 @@ mod tests { .to_http_request(); req.extensions_mut().insert(make_db()); - let result = CollectionRequest::extract(&req); + let result = block_on(CollectionRequest::extract(&req)); assert!(result.is_err()); let response: HttpResponse = result.err().unwrap().into(); assert_eq!(response.status(), 400); @@ -2084,62 +2113,79 @@ mod tests { */ } - #[test] - fn test_valid_collection_post_request() { + #[actix_rt::test] + async fn test_valid_collection_post_request() { // Batch requests require id's on each BSO let bso_body = json!([ {"id": "123", "payload": "xxx", "sortindex": 23}, {"id": "456", "payload": "xxxasdf", "sortindex": 23} ]); - let result = post_collection("", &bso_body).unwrap(); + let result = post_collection("", &bso_body) + .await + .expect("Could not get result in test_valid_collection_post_request"); assert_eq!(result.user_id.legacy_id, *USER_ID); assert_eq!(&result.collection, "tabs"); assert_eq!(result.bsos.valid.len(), 2); assert!(result.batch.is_none()); } - #[test] - fn test_invalid_collection_post_request() { + #[actix_rt::test] + async fn test_invalid_collection_post_request() { // Add extra fields, these will be invalid let bso_body = json!([ {"id": "1", "sortindex": 23, "jump": 1}, {"id": "2", "sortindex": -99, "hop": "low"} ]); - let result = post_collection("", &bso_body).unwrap(); + let result = post_collection("", &bso_body) + .await + .expect("Could not get result in test_invalid_collection_post_request"); assert_eq!(result.user_id.legacy_id, *USER_ID); assert_eq!(&result.collection, "tabs"); assert_eq!(result.bsos.invalid.len(), 2); } - #[test] - fn test_valid_collection_batch_post_request() { + #[actix_rt::test] + // #[test] + async fn test_valid_collection_batch_post_request() { // If the "batch" parameter is has no value or has a value of "true" // then a new batch will be created. let bso_body = json!([ {"id": "123", "payload": "xxx", "sortindex": 23}, {"id": "456", "payload": "xxxasdf", "sortindex": 23} ]); - let result = post_collection("batch=True", &bso_body).unwrap(); + let result = post_collection("batch=True", &bso_body) + .await + .expect("Could not get result in test_valid_collection_batch_post_request"); assert_eq!(result.user_id.legacy_id, *USER_ID); assert_eq!(&result.collection, "tabs"); assert_eq!(result.bsos.valid.len(), 2); - let batch = result.batch.unwrap(); + let batch = result + .batch + .expect("Could not get batch in test_valid_collection_batch_post_request"); assert!(batch.id.is_none()); assert_eq!(batch.commit, false); - let result = post_collection("batch", &bso_body).unwrap(); - let batch = result.batch.unwrap(); - assert!(batch.id.is_none()); - assert_eq!(batch.commit, false); - - let result = post_collection("batch=MTI%3D&commit=true", &bso_body).unwrap(); - let batch = result.batch.unwrap(); - assert!(batch.id.is_some()); - assert_eq!(batch.commit, true); - } - - #[test] - fn test_invalid_collection_batch_post_request() { + let result2 = post_collection("batch", &bso_body) + .await + .expect("Could not get result2 in test_valid_collection_batch_post_request"); + let batch2 = result2 + .batch + .expect("Could not get batch2 in test_valid_collection_batch_post_request"); + assert!(batch2.id.is_none()); + assert_eq!(batch2.commit, false); + + let result3 = post_collection("batch=MTI%3D&commit=true", &bso_body) + .await + .expect("Could not get result3 in test_valid_collection_batch_post_request"); + let batch3 = result3 + .batch + .expect("Could not get batch3 in test_valid_collection_batch_post_request"); + assert!(batch3.id.is_some()); + assert_eq!(batch3.commit, true); + } + + #[actix_rt::test] + async fn test_invalid_collection_batch_post_request() { let bso_body = json!([ {"id": "123", "payload": "xxx", "sortindex": 23}, {"id": "456", "payload": "xxxasdf", "sortindex": 23} @@ -2148,7 +2194,7 @@ mod tests { .method(Method::POST) .data(make_state()) .to_http_request(); - let result = post_collection("commit=true", &bso_body); + let result = post_collection("commit=true", &bso_body).await; assert!(result.is_err()); let response: HttpResponse = result.err().unwrap().into(); assert_eq!(response.status(), 400); @@ -2238,13 +2284,10 @@ mod tests { .data(state) .param("uid", &USER_ID_STR) .to_http_request(); - let payload = actix_http::h1::Payload::empty(); - HawkIdentifier::from_request(&req, &mut payload.into()) - .and_then(|result| { - assert_eq!(result.legacy_id, *USER_ID); - Ok(()) - }) - .unwrap(); + let mut payload = Payload::None; + let result = block_on(HawkIdentifier::from_request(&req, &mut payload)) + .expect("Could not get result in valid_header_with_valid_path"); + assert_eq!(result.legacy_id, *USER_ID); } #[test] @@ -2262,7 +2305,7 @@ mod tests { .method(Method::GET) .param("uid", mismatch_uid) .to_http_request(); - let result = HawkIdentifier::extract(&req); + let result = block_on(HawkIdentifier::extract(&req)); assert!(result.is_err()); let response: HttpResponse = result.err().unwrap().into(); assert_eq!(response.status(), 400); diff --git a/src/web/handlers.rs b/src/web/handlers.rs index e9ef07694a..709494ff57 100644 --- a/src/web/handlers.rs +++ b/src/web/handlers.rs @@ -2,11 +2,16 @@ use std::collections::HashMap; use actix_web::{http::StatusCode, Error, HttpRequest, HttpResponse}; -use futures::future::{self, Either, Future}; +use futures::future::{self, Either, Future, FutureExt, LocalBoxFuture, TryFutureExt}; use serde::Serialize; use serde_json::{json, Value}; -use crate::db::{params, results::Paginated, DbError, DbErrorKind}; +use crate::db::{ + params, + results::{GetBso, Paginated, PostBsos}, + util::SyncTimestamp, + DbError, DbErrorKind, +}; use crate::error::{ApiError, ApiErrorKind}; use crate::web::extractors::{ BsoPutRequest, BsoRequest, CollectionPostRequest, CollectionRequest, ConfigRequest, @@ -16,66 +21,93 @@ use crate::web::{X_LAST_MODIFIED, X_WEAVE_NEXT_OFFSET, X_WEAVE_RECORDS}; pub const ONE_KB: f64 = 1024.0; -pub fn get_collections(meta: MetaRequest) -> impl Future { +pub fn get_collections(meta: MetaRequest) -> impl Future> { meta.metrics.incr("request.get_collections"); meta.db .get_collection_timestamps(meta.user_id) .map_err(From::from) - .map(|result| { - HttpResponse::build(StatusCode::OK) - .header(X_WEAVE_RECORDS, result.len().to_string()) - .json(result) - }) + .map( + |result: Result< + std::collections::HashMap, + Error, + >| { + let result = result.expect("Could not get result in get_collections"); + Ok(HttpResponse::build(StatusCode::OK) + .header(X_WEAVE_RECORDS, result.len().to_string()) + .json(result)) + }, + ) } -pub fn get_collection_counts(meta: MetaRequest) -> impl Future { +pub fn get_collection_counts( + meta: MetaRequest, +) -> impl Future> { meta.metrics.incr("request.get_collection_counts"); meta.db .get_collection_counts(meta.user_id) .map_err(From::from) - .map(|result| { - HttpResponse::build(StatusCode::OK) - .header(X_WEAVE_RECORDS, result.len().to_string()) - .json(result) - }) + .map( + |result: std::result::Result< + std::collections::HashMap, + Error, + >| { + let result = result.expect("Could not get result in get_collection_counts"); + Ok(HttpResponse::build(StatusCode::OK) + .header(X_WEAVE_RECORDS, result.len().to_string()) + .json(result)) + }, + ) } -pub fn get_collection_usage(meta: MetaRequest) -> impl Future { +pub fn get_collection_usage( + meta: MetaRequest, +) -> impl Future> { meta.metrics.incr("request.get_collection_usage"); meta.db .get_collection_usage(meta.user_id) .map_err(From::from) - .map(|usage| { - let usage: HashMap<_, _> = usage - .into_iter() - .map(|(coll, size)| (coll, size as f64 / ONE_KB)) - .collect(); - HttpResponse::build(StatusCode::OK) - .header(X_WEAVE_RECORDS, usage.len().to_string()) - .json(usage) - }) + .map( + |usage: std::result::Result< + std::collections::HashMap, + Error, + >| { + let usage = usage.expect("Could not get usage in get_collection_usage"); + let usage: HashMap<_, _> = usage + .into_iter() + .map(|(coll, size)| (coll, size as f64 / ONE_KB)) + .collect(); + Ok(HttpResponse::build(StatusCode::OK) + .header(X_WEAVE_RECORDS, usage.len().to_string()) + .json(usage)) + }, + ) } -pub fn get_quota(meta: MetaRequest) -> impl Future { +pub fn get_quota(meta: MetaRequest) -> impl Future> { meta.metrics.incr("request.get_quota"); meta.db .get_storage_usage(meta.user_id) .map_err(From::from) - .map(|usage| HttpResponse::Ok().json(vec![Some(usage as f64 / ONE_KB), None])) + .map(|usage: std::result::Result| { + let usage = usage.expect("Could not get usage in get_quota"); + Ok(HttpResponse::Ok().json(vec![Some(usage as f64 / ONE_KB), None])) + }) } -pub fn delete_all(meta: MetaRequest) -> impl Future { +pub fn delete_all(meta: MetaRequest) -> impl Future> { #![allow(clippy::unit_arg)] meta.metrics.incr("request.delete_all"); meta.db .delete_storage(meta.user_id) .map_err(From::from) - .map(|result| HttpResponse::Ok().json(result)) + .map(|result: Result<(), Error>| { + Ok(HttpResponse::Ok().json(result.expect("Could not get result in delete_all"))) + }) } pub fn delete_collection( coll: CollectionRequest, -) -> impl Future { +) -> impl Future> { let delete_bsos = !coll.query.ids.is_empty(); let metrics = coll.metrics.clone(); let fut = if delete_bsos { @@ -97,11 +129,11 @@ pub fn delete_collection( if e.is_collection_not_found() || e.is_bso_not_found() { coll.db.get_storage_timestamp(coll.user_id) } else { - Box::new(future::err(e)) + Box::pin(future::err(e)) } }) .map_err(From::from) - .map(move |result| { + .map_ok(move |result: SyncTimestamp| { HttpResponse::Ok() .if_true(delete_bsos, |resp| { resp.header(X_LAST_MODIFIED, result.as_header()); @@ -110,7 +142,9 @@ pub fn delete_collection( }) } -pub fn get_collection(coll: CollectionRequest) -> impl Future { +pub fn get_collection( + coll: CollectionRequest, +) -> impl Future> { coll.metrics.clone().incr("request.get_collection"); let params = params::GetBsos { user_id: coll.user_id.clone(), @@ -119,73 +153,83 @@ pub fn get_collection(coll: CollectionRequest) -> impl Future( coll: CollectionRequest, fut: F, -) -> impl Future +) -> LocalBoxFuture<'static, Result> where - F: Future, Error = ApiError> + 'static, + F: Future, ApiError>> + 'static, T: Serialize + Default + 'static, { let reply_format = coll.reply; - fut.or_else(move |e| { - if e.is_collection_not_found() { - // For b/w compat, non-existent collections must return an - // empty list - Ok(Paginated::default()) - } else { - Err(e) - } - }) - .map_err(From::from) - .and_then(|result| { - coll.db - .extract_resource(coll.user_id, Some(coll.collection), None) - .map_err(From::from) - .map(move |ts| (result, ts)) - }) - .map(move |(result, ts)| { - let mut builder = HttpResponse::build(StatusCode::OK); - let resp = builder - .header(X_LAST_MODIFIED, ts.as_header()) - .header(X_WEAVE_RECORDS, result.items.len().to_string()) - .if_some(result.offset, |offset, resp| { - resp.header(X_WEAVE_NEXT_OFFSET, offset); - }); - match reply_format { - ReplyFormat::Json => resp.json(result.items), - ReplyFormat::Newlines => { - let items: String = result - .items - .into_iter() - .map(|v| serde_json::to_string(&v).unwrap_or_else(|_| "".to_string())) - .filter(|v| !v.is_empty()) - .map(|v| v.replace("\n", "\\u000a") + "\n") - .collect(); - resp.header("Content-Type", "application/newlines") - .header("Content-Length", format!("{}", items.len())) - .body(items) + Box::pin( + fut.or_else(move |e| { + if e.is_collection_not_found() { + // For b/w compat, non-existent collections must return an + // empty list + future::ok(Paginated::default()) + } else { + future::err(e) } - } - }) + }) + .map_err(From::from) + .and_then(|result| { + coll.db + .extract_resource(coll.user_id, Some(coll.collection), None) + .map_err(From::from) + .map(move |ts| Ok((result, ts))) + }) + .map( + move |r: std::result::Result< + (Paginated, std::result::Result), + Error, + >| { + let (result, ts) = r.expect("Could not get r in finish_get_collection"); + let ts = ts.expect("Could not get ts in finish_get_collection"); + let mut builder = HttpResponse::build(StatusCode::OK); + let resp = builder + .header(X_LAST_MODIFIED, ts.as_header()) + .header(X_WEAVE_RECORDS, result.items.len().to_string()) + .if_some(result.offset, |offset, resp| { + resp.header(X_WEAVE_NEXT_OFFSET, offset); + }); + match reply_format { + ReplyFormat::Json => Ok(resp.json(result.items)), + ReplyFormat::Newlines => { + let items: String = result + .items + .into_iter() + .map(|v| serde_json::to_string(&v).unwrap_or_else(|_| "".to_string())) + .filter(|v| !v.is_empty()) + .map(|v| v.replace("\n", "\\u000a") + "\n") + .collect(); + Ok(resp + .header("Content-Type", "application/newlines") + .header("Content-Length", format!("{}", items.len())) + .body(items)) + } + } + }, + ), + ) } pub fn post_collection( coll: CollectionPostRequest, -) -> impl Future { +) -> impl Future> { coll.metrics.clone().incr("request.post_collection"); if coll.batch.is_some() { - return Either::A(post_collection_batch(coll)); + return Either::Left(post_collection_batch(coll)); } - Either::B( + Either::Right( coll.db .post_bsos(params::PostBsos { user_id: coll.user_id, @@ -194,17 +238,18 @@ pub fn post_collection( failed: coll.bsos.invalid, }) .map_err(From::from) - .map(|result| { - HttpResponse::build(StatusCode::OK) + .map(|result: std::result::Result| { + let result = result.expect("Could not get result in post_collection"); + Ok(HttpResponse::build(StatusCode::OK) .header(X_LAST_MODIFIED, result.modified.as_header()) - .json(result) + .json(result)) }), ) } pub fn post_collection_batch( coll: CollectionPostRequest, -) -> impl Future { +) -> impl Future> { coll.metrics.clone().incr("request.post_collection_batch"); // Bail early if we have nonsensical arguments let breq = match coll.batch.clone() { @@ -212,13 +257,13 @@ pub fn post_collection_batch( None => { let err: DbError = DbErrorKind::BatchNotFound.into(); let err: ApiError = err.into(); - return Either::A(future::err(err.into())); + return Either::Left(future::err(err.into())); } }; let fut = if let Some(id) = breq.id.clone() { // Validate the batch before attempting a full append (for efficiency) - Either::A( + Either::Left( coll.db .validate_batch(params::ValidateBatch { user_id: coll.user_id.clone(), @@ -235,7 +280,7 @@ pub fn post_collection_batch( }), ) } else { - Either::B(coll.db.create_batch(params::CreateBatch { + Either::Right(coll.db.create_batch(params::CreateBatch { user_id: coll.user_id.clone(), collection: coll.collection.clone(), bsos: vec![], @@ -247,7 +292,7 @@ pub fn post_collection_batch( let user_id = coll.user_id.clone(); let collection = coll.collection.clone(); - Either::B( + Either::Right( fut.and_then(move |id| { let mut success = vec![]; let mut failed = coll.bsos.invalid.clone(); @@ -259,7 +304,7 @@ pub fn post_collection_batch( // Spanner we would pay twice the mutations for those pending // items (once writing them to to batch_bsos, then again // writing them to bsos) - Either::A( + Either::Left( coll.db .post_bsos(params::PostBsos { user_id: coll.user_id.clone(), @@ -282,7 +327,7 @@ pub fn post_collection_batch( .and_then(|_| future::ok(())), ) } else { - Either::B(coll.db.append_to_batch(params::AppendToBatch { + Either::Right(coll.db.append_to_batch(params::AppendToBatch { user_id: coll.user_id.clone(), collection: coll.collection.clone(), id: id.clone(), @@ -309,7 +354,7 @@ pub fn post_collection_batch( if !breq.commit { resp["batch"] = json!(&id); - return Either::A(future::ok(HttpResponse::Accepted().json(resp))); + return Either::Left(future::ok(HttpResponse::Accepted().json(resp))); } let fut = db @@ -329,22 +374,23 @@ pub fn post_collection_batch( }) } else { let err: DbError = DbErrorKind::BatchNotFound.into(); - Box::new(future::err(err.into())) + Box::pin(future::err(err.into())) } }) .map_err(From::from) - .map(|result| { + .map(|result: std::result::Result| { + let result = result.expect("Could not get result in post_collection_batch"); resp["modified"] = json!(result.modified); - HttpResponse::build(StatusCode::OK) + Ok(HttpResponse::build(StatusCode::OK) .header(X_LAST_MODIFIED, result.modified.as_header()) - .json(resp) + .json(resp)) }); - Either::B(fut) + Either::Right(fut) }), ) } -pub fn delete_bso(bso_req: BsoRequest) -> impl Future { +pub fn delete_bso(bso_req: BsoRequest) -> impl Future> { bso_req.metrics.incr("request.delete_bso"); bso_req .db @@ -354,10 +400,15 @@ pub fn delete_bso(bso_req: BsoRequest) -> impl Future| match result { + Ok(result) => Ok(HttpResponse::Ok().json(json!({ "modified": result }))), + Err(_e) => Ok(HttpResponse::NotFound().finish()), + }, + ) } -pub fn get_bso(bso_req: BsoRequest) -> impl Future { +pub fn get_bso(bso_req: BsoRequest) -> impl Future> { bso_req.metrics.incr("request.get_bso"); bso_req .db @@ -367,15 +418,18 @@ pub fn get_bso(bso_req: BsoRequest) -> impl Future, Error>| { + let result = result.expect("Could not get result in get_bso"); + result.map_or_else( + || Ok(HttpResponse::NotFound().finish()), + |bso| Ok(HttpResponse::Ok().json(bso)), + ) + }, + ) } -pub fn put_bso(bso_req: BsoPutRequest) -> impl Future { +pub fn put_bso(bso_req: BsoPutRequest) -> impl Future> { bso_req.metrics.incr("request.put_bso"); bso_req .db @@ -388,21 +442,22 @@ pub fn put_bso(bso_req: BsoPutRequest) -> impl Future| { + let result = result.expect("Could not get result in put_bso"); + Ok(HttpResponse::build(StatusCode::OK) .header(X_LAST_MODIFIED, result.as_header()) - .json(result) + .json(result)) }) } -pub fn get_configuration(creq: ConfigRequest) -> impl Future { - future::result(Ok(HttpResponse::Ok().json(creq.limits))) +pub fn get_configuration(creq: ConfigRequest) -> impl Future> { + future::ready(Ok(HttpResponse::Ok().json(creq.limits))) } /** Returns a status message indicating the state of the current server * */ -pub fn heartbeat(hb: HeartbeatRequest) -> impl Future { +pub fn heartbeat(hb: HeartbeatRequest) -> impl Future> { let mut checklist = HashMap::new(); checklist.insert( "version".to_owned(), @@ -435,7 +490,7 @@ pub fn heartbeat(hb: HeartbeatRequest) -> impl Future impl Future { +) -> impl Future> { // generate an error for sentry. /* The various error log macros only can take a string. @@ -456,5 +511,5 @@ pub fn test_error( // ApiError will call the middleware layer to auto-append the tags. let err = ApiError::from(ApiErrorKind::Internal("Oh Noes!".to_owned())); - future::result(Err(err)) + future::ready(Err(err)) } diff --git a/src/web/middleware/db.rs b/src/web/middleware/db.rs index 9d043fc09f..525b771b6a 100644 --- a/src/web/middleware/db.rs +++ b/src/web/middleware/db.rs @@ -1,15 +1,13 @@ +use std::task::Context; use std::{cell::RefCell, rc::Rc}; -use actix_service::{Service, Transform}; use actix_web::{ - dev::{ServiceRequest, ServiceResponse}, + dev::{Service, ServiceRequest, ServiceResponse, Transform}, http::{header::HeaderValue, Method}, Error, HttpMessage, HttpResponse, }; -use futures::{ - future::{self, Either, FutureResult}, - Future, Poll, -}; +use futures::future::{self, Either, LocalBoxFuture, Ready, TryFutureExt}; +use std::task::Poll; use crate::db::params; use crate::server::{metrics, ServerState}; @@ -42,7 +40,7 @@ where type Error = Error; type InitError = (); type Transform = DbTransactionMiddleware; - type Future = FutureResult; + type Future = Ready>; fn new_transform(&self, service: S) -> Self::Future { future::ok(DbTransactionMiddleware { @@ -65,14 +63,15 @@ where type Request = ServiceRequest; type Response = ServiceResponse; type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; - fn poll_ready(&mut self) -> Poll<(), Self::Error> { - self.service.poll_ready() + fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + self.service.poll_ready(cx) } fn call(&mut self, sreq: ServiceRequest) -> Self::Future { - let no_agent = HeaderValue::from_str("NONE").unwrap(); + let no_agent = HeaderValue::from_str("NONE") + .expect("Could not get no_agent in DbTransactionMiddleware::call"); let useragent = sreq .headers() .get("user-agent") @@ -82,7 +81,7 @@ where info!(">>> testing db middleware"; "user_agent" => useragent); if DOCKER_FLOW_ENDPOINTS.contains(&sreq.uri().path().to_lowercase().as_str()) { let mut service = Rc::clone(&self.service); - return Box::new(service.call(sreq)); + return Box::pin(service.call(sreq)); } let tags = match sreq.extensions().get::() { @@ -93,7 +92,7 @@ where let state = match &sreq.app_data::() { Some(v) => v.clone(), None => { - return Box::new(future::ok( + return Box::pin(future::ok( sreq.into_response( HttpResponse::InternalServerError() .content_type("application/json") @@ -109,7 +108,7 @@ where // Semi-example to show how to use metrics inside of middleware. metrics::Metrics::from(&state).incr("sync.error.collectionParam"); warn!("⚠️ CollectionParam err: {:?}", e); - return Box::new(future::ok( + return Box::pin(future::ok( sreq.into_response( HttpResponse::InternalServerError() .content_type("application/json") @@ -124,7 +123,7 @@ where Ok(v) => v, Err(e) => { warn!("⚠️ Bad Hawk Id: {:?}", e; "user_agent"=> useragent); - return Box::new(future::ok( + return Box::pin(future::ok( sreq.into_response( HttpResponse::Unauthorized() .content_type("application/json") @@ -144,12 +143,12 @@ where user_id: hawk_user_id, collection: collection.collection, }; - Either::A(match method { + Either::Left(match method { Method::GET | Method::HEAD => db.lock_for_read(lc), _ => db.lock_for_write(lc), }) } else { - Either::B(future::ok(())) + Either::Right(future::ok(())) } .or_else(move |e| db.rollback().and_then(|_| future::err(e))) .map_err(Into::into) @@ -165,10 +164,10 @@ where Some(_) => db2.rollback(), } .map_err(Into::into) - .and_then(|_| resp) + .and_then(|_| future::ok(resp)) }) }) }); - Box::new(fut) + Box::pin(fut) } } diff --git a/src/web/middleware/precondition.rs b/src/web/middleware/precondition.rs index 6655ca20c8..531247ab50 100644 --- a/src/web/middleware/precondition.rs +++ b/src/web/middleware/precondition.rs @@ -1,16 +1,6 @@ +use std::task::Context; use std::{cell::RefCell, rc::Rc}; -use actix_service::{Service, Transform}; -use actix_web::{ - dev::{ServiceRequest, ServiceResponse}, - http::{header, StatusCode}, - Error, HttpMessage, HttpResponse, -}; -use futures::{ - future::{self, Either, FutureResult}, - Future, Poll, -}; - use crate::web::{ extractors::{ extrude_db, BsoParam, CollectionParam, PreConditionHeader, PreConditionHeaderOpt, @@ -19,6 +9,13 @@ use crate::web::{ tags::Tags, DOCKER_FLOW_ENDPOINTS, X_LAST_MODIFIED, }; +use actix_web::{ + dev::{Service, ServiceRequest, ServiceResponse, Transform}, + http::{header, StatusCode}, + Error, HttpMessage, HttpResponse, +}; +use futures::future::{self, Either, FutureExt, LocalBoxFuture, TryFutureExt}; +use std::task::Poll; #[derive(Debug)] pub struct PreConditionCheck; @@ -46,12 +43,13 @@ where type Error = Error; type InitError = (); type Transform = PreConditionCheckMiddleware; - type Future = FutureResult; + type Future = LocalBoxFuture<'static, Result>; fn new_transform(&self, service: S) -> Self::Future { future::ok(PreConditionCheckMiddleware { service: Rc::new(RefCell::new(service)), }) + .boxed_local() } } @@ -68,17 +66,17 @@ where type Request = ServiceRequest; type Response = ServiceResponse; type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; // call super poll_ready() - fn poll_ready(&mut self) -> Poll<(), Self::Error> { - self.service.poll_ready() + fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + self.service.poll_ready(cx) } fn call(&mut self, sreq: ServiceRequest) -> Self::Future { if DOCKER_FLOW_ENDPOINTS.contains(&sreq.uri().path().to_lowercase().as_str()) { let mut service = Rc::clone(&self.service); - return Box::new(service.call(sreq)); + return Box::new(service.call(sreq)).boxed_local(); } // Pre check @@ -97,7 +95,7 @@ where }, Err(e) => { warn!("⚠️ Precondition error {:?}", e); - return Box::new(future::ok( + return Box::pin(future::ok( sreq.into_response( HttpResponse::BadRequest() .content_type("application/json") @@ -111,7 +109,7 @@ where Ok(v) => v, Err(e) => { warn!("⚠️ Hawk header error {:?}", e); - return Box::new(future::ok( + return Box::pin(future::ok( sreq.into_response( HttpResponse::Unauthorized() .content_type("application/json") @@ -125,8 +123,8 @@ where let db = match edb { Ok(v) => v, Err(e) => { - error!("Database access error {:?}", e); - return Box::new(future::ok( + error!("⚠️ Database access error {:?}", e); + return Box::pin(future::ok( sreq.into_response( HttpResponse::InternalServerError() .content_type("application/json") @@ -142,7 +140,7 @@ where Ok(v) => v.map(|c| c.collection), Err(e) => { warn!("⚠️ Collection Error: {:?}", e); - return Box::new(future::ok( + return Box::pin(future::ok( sreq.into_response( HttpResponse::InternalServerError() .content_type("application/json") @@ -156,7 +154,7 @@ where let bso_opt = bso.map(|b| b.bso); let mut service = Rc::clone(&self.service); - Box::new( + Box::pin( db.extract_resource(user_id, collection, bso_opt) .map_err(Into::into) .and_then(move |resource_ts| { @@ -174,7 +172,7 @@ where _ => StatusCode::OK, }; if status != StatusCode::OK { - return Either::A(future::ok( + return Either::Left(future::ok( sreq.into_response( HttpResponse::build(status) .content_type("application/json") @@ -186,9 +184,11 @@ where }; // Make the call, then do all the post-processing steps. - Either::B(service.call(sreq).map(move |mut resp| { + Either::Right(service.call(sreq).map(move |resp| { + let mut resp = + resp.expect("Could not get resp in PreConditionCheckMiddleware::call"); if resp.headers().contains_key(X_LAST_MODIFIED) { - return resp; + return Ok(resp); } // See if we already extracted one and use that if possible @@ -201,7 +201,7 @@ where ts_header, ); } - resp + Ok(resp) })) }), ) diff --git a/src/web/middleware/sentry.rs b/src/web/middleware/sentry.rs index c1a5842a17..1a82ed069c 100644 --- a/src/web/middleware/sentry.rs +++ b/src/web/middleware/sentry.rs @@ -1,14 +1,12 @@ +use std::task::Context; use std::{cell::RefCell, rc::Rc}; -use actix_service::{Service, Transform}; use actix_web::{ - dev::{ServiceRequest, ServiceResponse}, + dev::{Service, ServiceRequest, ServiceResponse, Transform}, Error, HttpMessage, }; -use futures::{ - future::{self, FutureResult}, - Future, Poll, -}; +use futures::future::{self, LocalBoxFuture, TryFutureExt}; +use std::task::Poll; use crate::error::ApiError; use crate::web::tags::Tags; @@ -38,12 +36,12 @@ where type Error = Error; type InitError = (); type Transform = SentryWrapperMiddleware; - type Future = FutureResult; + type Future = LocalBoxFuture<'static, Result>; fn new_transform(&self, service: S) -> Self::Future { - future::ok(SentryWrapperMiddleware { + Box::pin(future::ok(SentryWrapperMiddleware { service: Rc::new(RefCell::new(service)), - }) + })) } } @@ -61,10 +59,10 @@ where type Request = ServiceRequest; type Response = ServiceResponse; type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; - fn poll_ready(&mut self) -> Poll<(), Self::Error> { - self.service.poll_ready() + fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + self.service.poll_ready(cx) } fn call(&mut self, sreq: ServiceRequest) -> Self::Future { @@ -72,7 +70,7 @@ where let uri = sreq.head().uri.to_string(); sreq.extensions_mut().insert(tags.clone()); - Box::new(self.service.call(sreq).and_then(move |sresp| { + Box::pin(self.service.call(sreq).and_then(move |sresp| { // handed an actix_error::error::Error; // Fetch out the tags (in case any have been added.) match sresp.response().error() { @@ -109,7 +107,7 @@ where } } } - sresp + future::ok(sresp) })) } } diff --git a/src/web/middleware/weave.rs b/src/web/middleware/weave.rs index d4ae7f2221..aab6a9a3c7 100644 --- a/src/web/middleware/weave.rs +++ b/src/web/middleware/weave.rs @@ -1,15 +1,14 @@ use std::fmt::Display; +use std::task::Context; -use actix_service::{Service, Transform}; use actix_web::{ - dev::{ServiceRequest, ServiceResponse}, + dev::{Service, ServiceRequest, ServiceResponse, Transform}, http::header::{self, HeaderMap}, Error, }; -use futures::{ - future::{self, FutureResult}, - Future, Poll, -}; + +use futures::future::{self, LocalBoxFuture, TryFutureExt}; +use std::task::Poll; use crate::db::util::SyncTimestamp; use crate::error::{ApiError, ApiErrorKind}; @@ -28,20 +27,20 @@ where type Request = ServiceRequest; type Response = ServiceResponse; type Error = Error; - type Future = Box>; + type Future = LocalBoxFuture<'static, Result>; - fn poll_ready(&mut self) -> Poll<(), Self::Error> { - self.service.poll_ready() + fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll> { + self.service.poll_ready(cx) } fn call(&mut self, sreq: ServiceRequest) -> Self::Future { if DOCKER_FLOW_ENDPOINTS.contains(&sreq.uri().path().to_lowercase().as_str()) { - return Box::new(self.service.call(sreq)); + return Box::pin(self.service.call(sreq)); } let ts = SyncTimestamp::default().as_seconds(); - Box::new(self.service.call(sreq).and_then(move |mut resp| { - future::result( + Box::pin(self.service.call(sreq).and_then(move |mut resp| { + future::ready( set_weave_timestamp(resp.headers_mut(), ts) .map_err(Into::into) .map(|_| resp), @@ -96,7 +95,7 @@ impl Default for WeaveTimestamp { } } -impl Transform for WeaveTimestamp +impl Transform for WeaveTimestamp where S: Service, Error = Error>, S::Future: 'static, @@ -107,10 +106,10 @@ where type Error = Error; type InitError = (); type Transform = WeaveTimestampMiddleware; - type Future = FutureResult; + type Future = LocalBoxFuture<'static, Result>; fn new_transform(&self, service: S) -> Self::Future { - future::ok(WeaveTimestampMiddleware { service }) + Box::pin(future::ok(WeaveTimestampMiddleware { service })) } } diff --git a/src/web/tags.rs b/src/web/tags.rs index 6098acb3a4..5afb43f1f9 100644 --- a/src/web/tags.rs +++ b/src/web/tags.rs @@ -5,6 +5,8 @@ use actix_web::{ http::header::USER_AGENT, Error, FromRequest, HttpRequest, }; +use futures::future; +use futures::future::Ready; use serde::{ ser::{SerializeMap, Serializer}, Serialize, @@ -113,7 +115,7 @@ impl Tags { impl FromRequest for Tags { type Config = (); type Error = Error; - type Future = Result; + type Future = Ready>; fn from_request(req: &HttpRequest, _: &mut Payload) -> Self::Future { let tags = { @@ -124,7 +126,7 @@ impl FromRequest for Tags { } }; - Ok(tags) + future::ok(tags) } }