diff --git a/Cargo.lock b/Cargo.lock index b7bdb47c5..3c6b01c69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -65,15 +65,10 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "autocfg" version = "1.0.0" @@ -86,7 +81,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "addr2line 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "object 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -105,15 +100,6 @@ name = "base-x" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "base64" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "base64" version = "0.9.3" @@ -148,15 +134,6 @@ dependencies = [ "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "block-buffer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "arrayref 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "block-buffer" version = "0.7.3" @@ -184,18 +161,6 @@ dependencies = [ "byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "bodyparser" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "persistent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "bstr" version = "0.2.13" @@ -207,25 +172,11 @@ dependencies = [ "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "buf_redux" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "bumpalo" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "byte-tools" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "byte-tools" version = "0.3.1" @@ -236,15 +187,6 @@ name = "byteorder" version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "bytes" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "bytes" version = "0.5.4" @@ -318,17 +260,25 @@ dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cloudabi" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "comrak" -version = "0.3.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "entities 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pest_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "twoway 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "twoway 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "typed-arena 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "unicode_categories 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -352,7 +302,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -385,7 +335,7 @@ dependencies = [ "badge 0.3.0", "base64 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "comrak 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "comrak 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "crates-index-diff 7.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "criterion 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "dotenv 0.15.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -399,13 +349,12 @@ dependencies = [ "mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "notify 4.0.15 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "params 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "path-slash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "postgres 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "postgres 0.17.5 (registry+https://github.com/rust-lang/crates.io-index)", "procfs 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)", "prometheus 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "r2d2 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)", - "r2d2_postgres 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)", + "r2d2_postgres 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -416,7 +365,7 @@ dependencies = [ "rustwide 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "sass-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "schemamama 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "schemamama_postgres 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "schemamama_postgres 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", @@ -520,15 +469,6 @@ dependencies = [ "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "crypto-mac" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "crypto-mac" version = "0.8.0" @@ -593,14 +533,6 @@ dependencies = [ "syn 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "digest" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "digest" version = "0.8.1" @@ -631,7 +563,7 @@ name = "dirs-sys" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -725,7 +657,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "fallible-iterator" -version = "0.1.6" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -734,7 +666,7 @@ version = "0.1.15" 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)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -744,7 +676,7 @@ version = "0.2.10" 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)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -756,7 +688,7 @@ 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)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -783,7 +715,7 @@ name = "fs2" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -801,14 +733,9 @@ name = "fsevent-sys" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "fuchsia-zircon" version = "0.3.3" @@ -926,14 +853,6 @@ dependencies = [ "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "generic-array" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "generic-array" version = "0.12.3" @@ -957,7 +876,7 @@ version = "0.1.14" 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)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -972,7 +891,7 @@ version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "libgit2-sys 0.12.6+1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1043,28 +962,14 @@ name = "hermit-abi" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "hex" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "hex" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "hmac" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "crypto-mac 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "hmac" version = "0.8.1" @@ -1229,7 +1134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1237,15 +1142,20 @@ name = "inotify-sys" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "instant" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "iovec" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1283,7 +1193,7 @@ name = "jobserver" version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1336,7 +1246,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.70" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -1361,7 +1271,7 @@ version = "0.12.6+1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.56 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1373,7 +1283,7 @@ version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1386,6 +1296,14 @@ dependencies = [ "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "lock_api" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "log" version = "0.3.9" @@ -1438,11 +1356,6 @@ name = "maybe-uninit" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "md5" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "md5" version = "0.7.0" @@ -1453,7 +1366,7 @@ name = "memchr" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1482,17 +1395,6 @@ name = "mime" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "mime_guess" -version = "1.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "mime_guess" version = "2.0.3" @@ -1520,7 +1422,7 @@ dependencies = [ "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)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1556,7 +1458,7 @@ version = "0.6.8" 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.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1594,29 +1496,13 @@ dependencies = [ "sequence_trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "multipart" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "buf_redux 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "httparse 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mime_guess 1.8.8 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", - "safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "twoway 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "native-tls" version = "0.2.4" 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)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.10.29 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1633,7 +1519,7 @@ version = "0.2.34" 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)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1650,7 +1536,7 @@ dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1677,46 +1563,13 @@ dependencies = [ "fsevent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "inotify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", "mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)", "walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "num" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-bigint" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-complex" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "num-integer" version = "0.1.42" @@ -1726,27 +1579,6 @@ dependencies = [ "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "num-iter" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "num-rational" -version = "0.1.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", - "num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "num-traits" version = "0.2.11" @@ -1761,7 +1593,7 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1801,7 +1633,7 @@ dependencies = [ "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "foreign-types 0.3.2 (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.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "openssl-sys 0.9.56 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1817,7 +1649,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", "vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -1831,27 +1663,22 @@ dependencies = [ ] [[package]] -name = "params" -version = "0.8.0" +name = "parking_lot" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bodyparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "multipart 0.13.6 (registry+https://github.com/rust-lang/crates.io-index)", - "num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", - "tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "urlencoded 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "parking_lot" -version = "0.10.2" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "instant 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "lock_api 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1861,7 +1688,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)", "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (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.4.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 = "parking_lot_core" +version = "0.8.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.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "instant 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (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.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1890,20 +1731,6 @@ name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "persistent" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "pest" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "pest" version = "2.1.3" @@ -1912,16 +1739,6 @@ dependencies = [ "ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "pest_derive" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "pest_derive" version = "2.1.0" @@ -1953,14 +1770,6 @@ dependencies = [ "sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "phf" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "phf" version = "0.8.0" @@ -1971,15 +1780,6 @@ dependencies = [ "proc-macro-hack 0.5.15 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "phf_codegen" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "phf_codegen" version = "0.8.0" @@ -1989,15 +1789,6 @@ dependencies = [ "phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "phf_generator" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "phf_generator" version = "0.8.0" @@ -2020,15 +1811,6 @@ dependencies = [ "syn 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "phf_shared" -version = "0.7.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "phf_shared" version = "0.8.0" @@ -2091,45 +1873,44 @@ dependencies = [ [[package]] name = "postgres" -version = "0.15.2" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fallible-iterator 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", - "postgres-protocol 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "postgres-shared 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "socket2 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-postgres 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "postgres-protocol" -version = "0.3.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)", - "fallible-iterator 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "hmac 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", - "md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)", - "sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "hmac 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "md5 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", + "sha2 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "stringprep 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "postgres-shared" -version = "0.4.2" +name = "postgres-types" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", - "fallible-iterator 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)", - "postgres-protocol 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "postgres-protocol 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.53 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2195,7 +1976,7 @@ dependencies = [ "chrono 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.4.2 (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.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "libflate 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2216,11 +1997,6 @@ name = "quick-error" version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "quote" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "quote" version = "1.0.6" @@ -2241,75 +2017,26 @@ dependencies = [ [[package]] name = "r2d2_postgres" -version = "0.14.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "postgres 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", - "postgres-shared 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "postgres 0.17.5 (registry+https://github.com/rust-lang/crates.io-index)", "r2d2 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand_chacha" version = "0.2.2" @@ -2319,19 +2046,6 @@ dependencies = [ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "rand_core" version = "0.5.1" @@ -2340,14 +2054,6 @@ dependencies = [ "getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -2356,46 +2062,6 @@ dependencies = [ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 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 = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rand_pcg" version = "0.2.1" @@ -2404,14 +2070,6 @@ dependencies = [ "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "rayon" version = "1.3.0" @@ -2434,14 +2092,6 @@ dependencies = [ "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "redox_syscall" version = "0.1.56" @@ -2696,11 +2346,6 @@ name = "ryu" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "safemem" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "safemem" version = "0.3.3" @@ -2719,7 +2364,7 @@ name = "sass-rs" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "sass-sys 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2729,7 +2374,7 @@ version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)", "pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2761,10 +2406,10 @@ dependencies = [ [[package]] name = "schemamama_postgres" -version = "0.2.4" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "postgres 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)", + "postgres 0.17.5 (registry+https://github.com/rust-lang/crates.io-index)", "schemamama 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2781,7 +2426,7 @@ dependencies = [ "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -2791,7 +2436,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "core-foundation-sys 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -2905,17 +2550,6 @@ name = "sha1" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "sha2" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)", - "fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "sha2" version = "0.9.1" @@ -2939,14 +2573,9 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "arc-swap 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "siphasher" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "siphasher" version = "0.3.3" @@ -2976,7 +2605,7 @@ version = "0.3.12" 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)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3136,16 +2765,6 @@ name = "subtle" version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "syn" -version = "0.11.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "syn" version = "1.0.22" @@ -3166,14 +2785,6 @@ dependencies = [ "syn 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "synom" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "synstructure" version = "0.12.3" @@ -3193,7 +2804,7 @@ dependencies = [ "bytesize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.11 (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.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3205,27 +2816,18 @@ version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "xattr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "tempdir" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "tempfile" version = "3.1.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)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)", "remove_dir_all 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3297,7 +2899,7 @@ name = "time" version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3307,7 +2909,7 @@ version = "0.2.16" 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)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "standback 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "time-macros 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3355,7 +2957,7 @@ dependencies = [ "futures-core 0.3.5 (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.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)", "mio-named-pipes 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3378,6 +2980,27 @@ dependencies = [ "syn 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "tokio-postgres" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "async-trait 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "phf 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "pin-project-lite 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "postgres-protocol 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)", + "postgres-types 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "tokio-tls" version = "0.3.1" @@ -3430,10 +3053,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "twoway" -version = "0.1.8" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "unchecked-index 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3464,6 +3088,11 @@ name = "ucd-trie" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "unchecked-index" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "unic-char-property" version = "0.9.0" @@ -3550,11 +3179,6 @@ name = "unicode-width" version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "unicode-xid" -version = "0.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "unicode-xid" version = "0.2.0" @@ -3599,17 +3223,6 @@ dependencies = [ "serde 1.0.110 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "urlencoded" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "bodyparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "utf-8" version = "0.7.5" @@ -3794,7 +3407,7 @@ name = "xattr" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -3820,7 +3433,7 @@ name = "zstd-safe" version = "2.0.4+zstd.1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", "zstd-sys 1.4.16+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -3832,7 +3445,7 @@ dependencies = [ "cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)", "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)", ] [metadata] @@ -3846,28 +3459,21 @@ dependencies = [ "checksum arrayvec 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" "checksum async-trait 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a265e3abeffdce30b2e26b7a11b222fe37c6067404001b434101457d0385eb92" "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum backtrace 0.3.48 (registry+https://github.com/rust-lang/crates.io-index)" = "0df2f85c8a2abbe3b7d7e748052fdd9b76a0458fdeb16ad4223f5eca78c7c130" "checksum base-x 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b20b618342cf9891c292c4f5ac2cde7287cc5c87e87e9c769d617793607dec1" "checksum base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" "checksum base64 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)" = "53d1ccbaf7d9ec9537465a97bf19edc1a4e158ecb49fc16178202238c569cc42" -"checksum base64 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "96434f987501f0ed4eb336a411e0631ecd1afa11574fe148587adc4ff96143c9" "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum blake2b_simd 0.5.10 (registry+https://github.com/rust-lang/crates.io-index)" = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" -"checksum block-buffer 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a076c298b9ecdb530ed9d967e74a6027d6a7478924520acddcddc24c1c8ab3ab" "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" "checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -"checksum bodyparser 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f023abfa58aad6f6bc4ae0630799e24d5ee0ab8bb2e49f651d9b1f9aa4f52f30" "checksum bstr 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)" = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931" -"checksum buf_redux 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b9279646319ff816b05fb5897883ece50d7d854d12b59992683d4f8a71b0f949" "checksum bumpalo 3.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5356f1d23ee24a1f785a56d1d1a5f0fd5b0f6a0c0fb2412ce11da71649ab78f6" -"checksum byte-tools 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "560c32574a12a89ecd91f5e742165893f86e3ab98d21f8ea548658eb9eef5f40" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" -"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 bytesize 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "716960a18f978640f25101b5cbf1c6f6b0d3192fab36a2d98ca96f0ecbe41010" "checksum cast 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" @@ -3877,7 +3483,8 @@ dependencies = [ "checksum chrono-tz 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e0e430fad0384e4defc3dc6b1223d1b886087a8bf9b7080e5ae027f73851ea15" "checksum clap 2.33.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum comrak 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a9bd60be8877a3343d25b9a3dadbaf7f02f9ac843b54e663ecef73e29e8b9c6b" +"checksum cloudabi 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4344512281c643ae7638bbabc3af17a11307803ec8f0fcad9fae512a8bf36467" +"checksum comrak 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b818732a109eeabbe99fee28030ff8ecbd606889fcd25509ed933e6c69b7aa69" "checksum conduit-mime-types 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "95ca30253581af809925ef68c2641cc140d6183f43e12e0af4992d53768bd7b8" "checksum constant_time_eq 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" "checksum core-foundation 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" @@ -3891,14 +3498,12 @@ dependencies = [ "checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" "checksum crossbeam-queue 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" "checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -"checksum crypto-mac 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0999b4ff4d3446d4ddb19a63e9e00c1876e75cd7000d20e57a693b4b3f08d958" "checksum crypto-mac 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" "checksum cssparser 0.27.2 (registry+https://github.com/rust-lang/crates.io-index)" = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a" "checksum cssparser-macros 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" "checksum csv 1.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" "checksum csv-core 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" "checksum derive_more 0.99.7 (registry+https://github.com/rust-lang/crates.io-index)" = "2127768764f1556535c01b5326ef94bd60ff08dcfbdc544d53e69ed155610f5d" -"checksum digest 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)" = "03b072242a8cbaf9c145665af9d250c59af3b958f83ed6824e13533cf76d5b90" "checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" "checksum dirs 2.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "13aea89a5c93364a98e9b37b2fa237effbb694d5cfe01c5b70941f7eb087d5e3" @@ -3915,7 +3520,7 @@ dependencies = [ "checksum failure 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" "checksum failure_derive 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" "checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" -"checksum fallible-iterator 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "eb7217124812dc5672b7476d0c2d20cfe9f7c0f1ba0904b674a9762a0212f72e" +"checksum fallible-iterator 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" "checksum filetime 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "714653f3e34871534de23771ac7b26e999651a0a228f47beb324dfdf1dd4b10f" "checksum filetime 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "affc17579b132fc2461adf7c575cc6e8b134ebca52c51f5411388965227dc695" "checksum flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" @@ -3925,7 +3530,6 @@ dependencies = [ "checksum fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" "checksum fsevent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" "checksum fsevent-sys 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" "checksum futf 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b" @@ -3941,7 +3545,6 @@ dependencies = [ "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 generic-array 0.14.3 (registry+https://github.com/rust-lang/crates.io-index)" = "60fb4bb6bba52f78a471264d9a3b7d026cc0af47b22cd2cffbc0b787ca003e63" -"checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum gimli 0.21.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" "checksum git2 0.13.6 (registry+https://github.com/rust-lang/crates.io-index)" = "11e4b2082980e751c4bf4273e9cbb4a02c655729c8ee8a79f66cad03c8f4d31e" @@ -3952,9 +3555,7 @@ dependencies = [ "checksum half 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71" -"checksum hex 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d6a22814455d41612f41161581c2883c0c6a1c41852729b17d5ed88f01e153aa" "checksum hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" -"checksum hmac 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "44f3bdb08579d99d7dc761c0e266f13b5f2ab8c8c703b9fc9ef333cd8f48f55e" "checksum hmac 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" "checksum html5ever 0.25.1 (registry+https://github.com/rust-lang/crates.io-index)" = "aafcf38a1a36118242d29b92e1b08ef84e67e4a5ed06e0a80be20e6a32bfed6b" "checksum http 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" @@ -3971,6 +3572,7 @@ dependencies = [ "checksum indexmap 1.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" "checksum inotify 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "24e40d6fd5d64e2082e0c796495c8ef5ad667a96d03e5aaa0becfd9d47bcbfb8" "checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" +"checksum instant 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "5b141fdc7836c525d4d594027d318c84161ca17aaf8113ab1f81ab93ae897485" "checksum iovec 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" "checksum iron 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2440ae846e7a8c7f9b401db8f6e31b4ea5e7d3688b91761337da7e054520c75b" "checksum itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" @@ -3983,12 +3585,13 @@ dependencies = [ "checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" -"checksum libc 0.2.70 (registry+https://github.com/rust-lang/crates.io-index)" = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f" +"checksum libc 0.2.74 (registry+https://github.com/rust-lang/crates.io-index)" = "a2f02823cf78b754822df5f7f268fb59822e7296276d3e069d8e8cb26a14bd10" "checksum libflate 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a1fbe6b967a94346446d37ace319ae85be7eca261bb8149325811ac435d35d64" "checksum libflate_lz77 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3286f09f7d4926fc486334f28d8d2e6ebe4f7f9994494b6dab27ddfad2c9b11b" "checksum libgit2-sys 0.12.6+1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bf81b43f9b45ab07897a780c9b7b26b1504497e469c7a78162fc29e3b8b1c1b3" "checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" "checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +"checksum lock_api 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "28247cc5a5be2f05fbcd76dd0cf2c7d3b5400cb978a28042abcd4fa0b3f8261c" "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" "checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" "checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" @@ -3996,14 +3599,12 @@ dependencies = [ "checksum markup5ever 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aae38d669396ca9b707bfc3db254bc382ddb94f57cc5c235f34623a669a01dab" "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" -"checksum md5 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "79c56d6a0b07f9e19282511c83fc5b086364cbae4ba8c7d5f190c3d9b0425a48" "checksum md5 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" "checksum memchr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "148fab2e51b4f1cfc66da2a7c32981d1d3c083a803978268bb11fe4b86925e7a" "checksum memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" "checksum memoffset 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" "checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -"checksum mime_guess 1.8.8 (registry+https://github.com/rust-lang/crates.io-index)" = "216929a5ee4dd316b1702eedf5e74548c123d370f47841ceaac38ca154690ca3" "checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" "checksum miniz_oxide 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" "checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" @@ -4014,7 +3615,6 @@ dependencies = [ "checksum miow 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "396aa0f2003d7df8395cb93e09871561ccc3e785f0acb369170e8cc74ddf9226" "checksum modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "41f5c9112cb662acd3b204077e0de5bc66305fa8df65c8019d5adb10e9ab6e58" "checksum mount 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "32245731923cd096899502fc4c4317cfd09f121e80e73f7f576cf3777a824256" -"checksum multipart 0.13.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92f54eb45230c3aa20864ccf0c277eeaeadcf5e437e91731db498dbf7fbe0ec6" "checksum native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" "checksum net2 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)" = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" "checksum new_debug_unreachable 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" @@ -4022,12 +3622,7 @@ dependencies = [ "checksum nodrop 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" "checksum nom 3.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05aec50c70fd288702bcd93284a8444607f3292dbdf2a30de5ea5dcdbe72287b" "checksum notify 4.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "80ae4a7688d1fab81c5bf19c64fc8db920be8d519ce6336ed4e7efe024724dbd" -"checksum num 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "4703ad64153382334aa8db57c637364c322d3372e097840c72000dabdcf6156e" -"checksum num-bigint 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "e63899ad0da84ce718c14936262a41cee2c79c981fc0a0e7c7beb47d5a07e8c1" -"checksum num-complex 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "b288631d7878aaf59442cffd36910ea604ecd7745c36054328595114001c9656" "checksum num-integer 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" -"checksum num-iter 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" -"checksum num-rational 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "ee314c74bd753fc86b4780aa9475da469155f3848473a261d2d18e35245a784e" "checksum num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" "checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" "checksum object 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2" @@ -4039,28 +3634,22 @@ dependencies = [ "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.56 (registry+https://github.com/rust-lang/crates.io-index)" = "f02309a7f127000ed50594f0b50ecc69e7c654e16d41b4e8156d1b3df8e0b52e" "checksum owned_ttf_parser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9f923fb806c46266c02ab4a5b239735c144bdeda724a50ed058e5226f594cde3" -"checksum params 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c789fdad2cfdaa551ea0e3a9eadb74c5d634968a9fb3a8c767d89be470d21589" "checksum parking_lot 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +"checksum parking_lot 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a4893845fa2ca272e647da5d0e46660a314ead9c2fdd9a883aabc32e481a8733" "checksum parking_lot_core 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +"checksum parking_lot_core 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c361aa727dd08437f2f1447be8b59a33b0edd15e0fcee698f935613d9efbca9b" "checksum parse-zoneinfo 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "feece9d0113b400182a7d00adcff81ccf29158c49c5abd11e2eed8589bf6ff07" "checksum path-slash 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ff65715a17cba8979903db6294baef56c5d39e05c8b054cffa31e69e61f24c68" "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 persistent 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8e8fa0009c4f3d350281309909c618abddf10bb7e3145f28410782f6a5ec74c5" -"checksum pest 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0fce5d8b5cc33983fc74f78ad552b5522ab41442c4ca91606e4236eb4b5ceefc" "checksum pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -"checksum pest_derive 1.0.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3294f437119209b084c797604295f40227cffa35c57220b1e99a6ff3bf8ee4" "checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" "checksum pest_generator 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" "checksum pest_meta 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" -"checksum phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" "checksum phf 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -"checksum phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" "checksum phf_codegen 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -"checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" "checksum phf_generator 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" "checksum phf_macros 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" -"checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" "checksum phf_shared 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" "checksum pin-project 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "edc93aeee735e60ecb40cf740eb319ff23eab1c5748abfdb5c180e4ce49f7791" "checksum pin-project-internal 0.4.17 (registry+https://github.com/rust-lang/crates.io-index)" = "e58db2081ba5b4c93bd6be09c40fd36cb9193a8336c384f3b40012e531aa7e40" @@ -4069,9 +3658,9 @@ dependencies = [ "checksum pkg-config 0.3.17 (registry+https://github.com/rust-lang/crates.io-index)" = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" "checksum plotters 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "f9b1d9ca091d370ea3a78d5619145d1b59426ab0c9eedbad2514a4cee08bf389" "checksum plugin 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a6a0dc3910bc8db877ffed8e457763b317cf880df4ae19109b9f77d277cf6e0" -"checksum postgres 0.15.2 (registry+https://github.com/rust-lang/crates.io-index)" = "115dde90ef51af573580c035857badbece2aa5cde3de1dfb3c932969ca92a6c5" -"checksum postgres-protocol 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2487e66455bf88a1b247bf08a3ce7fe5197ac6d67228d920b0ee6a0e97fd7312" -"checksum postgres-shared 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ffac35b3e0029b404c24a3b82149b4e904f293e8ca4a327eefa24d3ca50df36f" +"checksum postgres 0.17.5 (registry+https://github.com/rust-lang/crates.io-index)" = "14d864cf6c2eabf1323afe4145ff273aad1898e4f2a3bcb30347715df8624a07" +"checksum postgres-protocol 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "81c5b25980f9a9b5ad36e9cdc855530575396d8a57f67e14691a2440ed0d9a90" +"checksum postgres-types 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3d14b0a4f433b0e0b565bb0fbc0ac9fc3d79ca338ba265ad0e7eef0f3bcc5e94" "checksum ppv-lite86 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" "checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" "checksum proc-macro-error 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "98e9e4b82e0ef281812565ea4751049f1bdcdfccda7d3f459f2e138a40c08678" @@ -4082,30 +3671,16 @@ dependencies = [ "checksum procfs 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c434e93ef69c216e68e4f417c927b4f31502c3560b72cfdb6827e2321c5c6b3e" "checksum prometheus 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5567486d5778e2c6455b1b90ff1c558f29e751fc018130fa182e15828e728af1" "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" "checksum quote 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "54a21852a652ad6f610c9510194f398ff6f8692e334fd1145fed931f7fbe44ea" "checksum r2d2 0.8.8 (registry+https://github.com/rust-lang/crates.io-index)" = "1497e40855348e4a8a40767d8e55174bce1e445a3ac9254ad44ad468ee0485af" -"checksum r2d2_postgres 0.14.0 (registry+https://github.com/rust-lang/crates.io-index)" = "78c7fe9c0c3d2c298cf262bc3ce4b89cdf0eab620fd9fe759f65b34a1a00fb93" -"checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -"checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +"checksum r2d2_postgres 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "707d27f66f43bac1081141f6d9611fffcce7da2841ae97c7ac53619d098efe8f" "checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" "checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" "checksum rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" "checksum rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" "checksum rayon-core 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum redox_users 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "09b23093265f8d200fa7b4c2c76297f47e681c655f6f1285a8780d6a022f7431" "checksum regex 1.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a6020f034922e3194c711b82a627453881bc4682166cabb07134a10c26ba7692" @@ -4127,7 +3702,6 @@ dependencies = [ "checksum rusttype 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dc7c727aded0be18c5b80c1640eae0ac8e396abf6fa8477d96cb37d18ee5ec59" "checksum rustwide 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6e97a51dfbb3333ed70d6373d7980165d20dbd84a8173ab184c2c4d8f27bd122" "checksum ryu 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" -"checksum safemem 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e27a8b19b835f7aea908818e871f5cc3a5a186550c30773be987e155e8163d8f" "checksum safemem 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" "checksum sass-rs 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "cabcf7c6e55053f359911187ac401409aad2dc14338cae972dec266fee486abd" @@ -4135,7 +3709,7 @@ dependencies = [ "checksum schannel 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" "checksum scheduled-thread-pool 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0988d7fdf88d5e5fcf5923a0f1e8ab345f3e98ab4bc6bc45a2d5ff7f7458fbf6" "checksum schemamama 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1f726d3b10198a91b545c12e55775ddf4abb681056aa62adf75ed00b68855ef9" -"checksum schemamama_postgres 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a015da3208854a2e1cf94da0e1bf2882b9464690b5748444543b5383ed2abb6c" +"checksum schemamama_postgres 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0a5da098f7ee922d0c89a4416bf042e242e79f4966d40bf497f52849f2ffedda" "checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" "checksum security-framework 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" "checksum security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" @@ -4151,11 +3725,9 @@ dependencies = [ "checksum servo_arc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432" "checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" -"checksum sha2 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9eb6be24e4c23a84d7184280d2722f7f2731fcdd4a9d886efbfe4413e4847ea0" "checksum sha2 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2933378ddfeda7ea26f48c555bdad8bb446bf8a3d17832dc83e380d444cfb8c1" "checksum shlex 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" "checksum signal-hook-registry 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" -"checksum siphasher 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" "checksum siphasher 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7" "checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" "checksum slug 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39af1ce888a1253c8b9fcfa36626557650fb487c013620a743262d2769a3e9f3" @@ -4178,14 +3750,11 @@ dependencies = [ "checksum strum 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" "checksum strum_macros 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)" = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" "checksum subtle 2.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1" -"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" "checksum syn 1.0.22 (registry+https://github.com/rust-lang/crates.io-index)" = "1425de3c33b0941002740a420b1a906a350b88d08b82b2c8a01035a3f9447bac" "checksum syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" -"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" "checksum synstructure 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" "checksum systemstat 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2078da8d09c6202bffd5e075946e65bfad5ce2cfa161edb15c5f014a8440adee" "checksum tar 0.4.26 (registry+https://github.com/rust-lang/crates.io-index)" = "b3196bfbffbba3e57481b6ea32249fbaf590396a52505a2615adbb79d9d826d3" -"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum tendril 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "707feda9f2582d5d680d733e38755547a3e8fb471e7ba11452ecfd9ce93a5d3b" "checksum tera 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "55df25c7768a0fb9f165931366eb0f21587c407061e1e69c1f5c2b495adfd9bb" @@ -4200,6 +3769,7 @@ dependencies = [ "checksum tinytemplate 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f" "checksum tokio 0.2.22 (registry+https://github.com/rust-lang/crates.io-index)" = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" "checksum tokio-macros 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" +"checksum tokio-postgres 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "55a2482c9fe4dd481723cf5c0616f34afc710e55dcda0944e12e7b3316117892" "checksum tokio-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" "checksum tokio-util 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" "checksum toml 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" @@ -4207,12 +3777,13 @@ dependencies = [ "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" "checksum try-lock 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" "checksum ttf-parser 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "52fbe7769f5af5d7d25aea74b9443b64e544a5ffb4d2b2968295ddea934f1a06" -"checksum twoway 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "59b11b2b5241ba34be09c3cc85a36e56e48f9888862e19cedf23336d35316ed1" +"checksum twoway 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "6b40075910de3a912adbd80b5d8bad6ad10a23eeb1f5bf9d4006839e899ba5bc" "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" "checksum typed-arena 1.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9b2228007eba4120145f785df0f6c92ea538f5a3635a612ecf4e334c8c1446d" "checksum typemap 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "653be63c80a3296da5551e1bfd2cca35227e13cdd08c6668903ae2f4f77aa1f6" "checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" "checksum ucd-trie 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" +"checksum unchecked-index 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eeba86d422ce181a719445e51872fa30f1f7413b62becb52e95ec91aa262d85c" "checksum unic-char-property 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" "checksum unic-char-range 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" "checksum unic-common 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" @@ -4225,14 +3796,12 @@ dependencies = [ "checksum unicode-normalization 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" "checksum unicode-segmentation 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" "checksum unicode-width 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" -"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" "checksum unicode-xid 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" "checksum unicode_categories 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" "checksum unidecode 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d2adb95ee07cd579ed18131f2d9e7a17c25a4b76022935c7f2460d2bfae89fd2" "checksum unsafe-any 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f30360d7979f5e9c6e6cea48af192ea8fab4afb3cf72597154b8f08935bc9c7f" "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" "checksum url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" -"checksum urlencoded 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0a52f50139118b60ae91af08bf15ed158817d34b91b9d24c11ffbe21195d33e3" "checksum utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" "checksum vcpkg 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" "checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" diff --git a/Cargo.toml b/Cargo.toml index ba3d01646..ae52fd984 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,18 +18,18 @@ semver = { version = "0.9", features = ["serde"] } slug = "=0.1.1" env_logger = "0.7" r2d2 = "0.8" -r2d2_postgres = "0.14" +r2d2_postgres = "0.16" # iron needs url@1, but it reexports it as iron::url, so we can start using # url@2 for other usecases url = { version = "2.1.1", features = ["serde"] } badge = { path = "src/web/badge" } backtrace = "0.3" failure = { version = "0.1.3", features = ["backtrace"] } -comrak = { version = "0.3", default-features = false } +comrak = { version = "0.8", default-features = false } toml = "0.5" kuchiki = "0.8" schemamama = "0.3" -schemamama_postgres = "0.2" +schemamama_postgres = "0.3" systemstat = "0.1.4" prometheus = { version = "0.7.0", default-features = false } rustwide = "0.7.1" @@ -56,7 +56,6 @@ serde_json = "1.0" # iron dependencies iron = "0.5" router = "0.5" -params = "0.8" staticfile = { version = "0.4", features = [ "cache" ] } tempfile = "3.1.0" @@ -73,8 +72,8 @@ chrono = { version = "0.4.11", features = ["serde"] } time = "0.1" # TODO: Remove once `iron` is removed [dependencies.postgres] -version = "0.15" -features = ["with-chrono", "with-serde_json"] +version = "0.17" +features = ["with-chrono-0_4", "with-serde_json-1"] [target.'cfg(target_os = "linux")'.dependencies] # Process information diff --git a/src/bin/cratesfyi.rs b/src/bin/cratesfyi.rs index ef779ba68..bc6201bc7 100644 --- a/src/bin/cratesfyi.rs +++ b/src/bin/cratesfyi.rs @@ -216,12 +216,12 @@ impl PrioritySubcommand { pub fn handle_args(self, ctx: Context) -> Result<(), Error> { match self { Self::Set { pattern, priority } => { - set_crate_priority(&*ctx.conn()?, &pattern, priority) + set_crate_priority(&mut *ctx.conn()?, &pattern, priority) .context("Could not set pattern's priority")?; } Self::Remove { pattern } => { - if let Some(priority) = remove_crate_priority(&*ctx.conn()?, &pattern) + if let Some(priority) = remove_crate_priority(&mut *ctx.conn()?, &pattern) .context("Could not remove pattern's priority")? { println!("Removed pattern with priority {}", priority); @@ -367,7 +367,7 @@ impl BuildSubcommand { Self::UpdateToolchain { only_first_time } => { if only_first_time { - let conn = ctx + let mut conn = ctx .pool()? .get() .context("failed to get a database connection")?; @@ -449,7 +449,8 @@ impl DatabaseSubcommand { pub fn handle_args(self, ctx: Context) -> Result<(), Error> { match self { Self::Migrate { version } => { - db::migrate(version, &*ctx.conn()?).context("Failed to run database migrations")?; + db::migrate(version, &mut *ctx.conn()?) + .context("Failed to run database migrations")?; } Self::UpdateGithubFields => { @@ -461,7 +462,7 @@ impl DatabaseSubcommand { let index = Index::new(&ctx.config()?.registry_index_path)?; db::update_crate_data_in_database( - &*ctx.conn()?, + &mut *ctx.conn()?, &name, &index.api().get_crate_data(&name)?, )?; @@ -473,16 +474,18 @@ impl DatabaseSubcommand { } // FIXME: This is actually util command not database - Self::UpdateReleaseActivity => cratesfyi::utils::update_release_activity(&*ctx.conn()?) - .context("Failed to update release activity")?, + Self::UpdateReleaseActivity => { + cratesfyi::utils::update_release_activity(&mut *ctx.conn()?) + .context("Failed to update release activity")? + } Self::Delete { command: DeleteSubcommand::Version { name, version }, - } => db::delete_version(&*ctx.conn()?, &*ctx.storage()?, &name, &version) + } => db::delete_version(&mut *ctx.conn()?, &*ctx.storage()?, &name, &version) .context("failed to delete the crate")?, Self::Delete { command: DeleteSubcommand::Crate { name }, - } => db::delete_crate(&*ctx.conn()?, &*ctx.storage()?, &name) + } => db::delete_crate(&mut *ctx.conn()?, &*ctx.storage()?, &name) .context("failed to delete the crate")?, Self::Blacklist { command } => command.handle_args(ctx)?, } @@ -512,19 +515,19 @@ enum BlacklistSubcommand { impl BlacklistSubcommand { fn handle_args(self, ctx: Context) -> Result<(), Error> { - let conn = &*ctx.conn()?; + let mut conn = &mut *ctx.conn()?; match self { Self::List => { - let crates = db::blacklist::list_crates(&conn) + let crates = db::blacklist::list_crates(&mut conn) .context("failed to list crates on blacklist")?; println!("{}", crates.join("\n")); } - Self::Add { crate_name } => db::blacklist::add_crate(&conn, &crate_name) + Self::Add { crate_name } => db::blacklist::add_crate(&mut conn, &crate_name) .context("failed to add crate to blacklist")?, - Self::Remove { crate_name } => db::blacklist::remove_crate(&conn, &crate_name) + Self::Remove { crate_name } => db::blacklist::remove_crate(&mut conn, &crate_name) .context("failed to remove crate from blacklist")?, } Ok(()) @@ -602,7 +605,10 @@ impl Context { fn conn( &self, - ) -> Result, Error> { + ) -> Result< + r2d2::PooledConnection>, + Error, + > { Ok(self.pool()?.get()?) } } diff --git a/src/build_queue.rs b/src/build_queue.rs index 14066ff57..a5490abc6 100644 --- a/src/build_queue.rs +++ b/src/build_queue.rs @@ -39,7 +39,7 @@ impl BuildQueue { "SELECT COUNT(*) FROM queue WHERE attempt < $1;", &[&self.max_attempts], )?; - Ok(res.get(0).get::<_, i64>(0) as usize) + Ok(res[0].get::<_, i64>(0) as usize) } pub(crate) fn prioritized_count(&self) -> Result { @@ -47,7 +47,7 @@ impl BuildQueue { "SELECT COUNT(*) FROM queue WHERE attempt < $1 AND priority <= 0;", &[&self.max_attempts], )?; - Ok(res.get(0).get::<_, i64>(0) as usize) + Ok(res[0].get::<_, i64>(0) as usize) } pub(crate) fn failed_count(&self) -> Result { @@ -55,7 +55,7 @@ impl BuildQueue { "SELECT COUNT(*) FROM queue WHERE attempt >= $1;", &[&self.max_attempts], )?; - Ok(res.get(0).get::<_, i64>(0) as usize) + Ok(res[0].get::<_, i64>(0) as usize) } pub(crate) fn queued_crates(&self) -> Result> { @@ -82,7 +82,7 @@ impl BuildQueue { &self, f: impl FnOnce(&QueuedCrate) -> Result<()>, ) -> Result<()> { - let conn = self.db.get()?; + let mut conn = self.db.get()?; let queued = self.queued_crates()?; let to_process = match queued.get(0) { @@ -102,7 +102,7 @@ impl BuildQueue { "UPDATE queue SET attempt = attempt + 1 WHERE id = $1 RETURNING attempt;", &[&to_process.id], )?; - let attempt: i32 = rows.get(0).get(0); + let attempt: i32 = rows[0].get(0); if attempt >= self.max_attempts { crate::web::metrics::FAILED_BUILDS.inc(); diff --git a/src/db/add_package.rs b/src/db/add_package.rs index 6eab47aaf..90d8de0e6 100644 --- a/src/db/add_package.rs +++ b/src/db/add_package.rs @@ -12,7 +12,7 @@ use crate::{ utils::MetadataPackage, }; use log::{debug, info}; -use postgres::Connection; +use postgres::Client; use regex::Regex; use serde_json::Value; use slug::slugify; @@ -25,7 +25,7 @@ use slug::slugify; /// not the files generated by rustdoc. #[allow(clippy::too_many_arguments)] pub(crate) fn add_package_into_database( - conn: &Connection, + conn: &mut Client, metadata_pkg: &MetadataPackage, source_dir: &Path, res: &BuildResult, @@ -38,7 +38,7 @@ pub(crate) fn add_package_into_database( compression_algorithms: std::collections::HashSet, ) -> Result { debug!("Adding package into database"); - let crate_id = initialize_package_in_database(&conn, metadata_pkg)?; + let crate_id = initialize_package_in_database(conn, metadata_pkg)?; let dependencies = convert_dependencies(metadata_pkg); let rustdoc = get_rustdoc(metadata_pkg, source_dir).unwrap_or(None); let readme = get_readme(metadata_pkg, source_dir).unwrap_or(None); @@ -113,11 +113,11 @@ pub(crate) fn add_package_into_database( ], )?; - let release_id: i32 = rows.get(0).get(0); + let release_id: i32 = rows[0].get(0); - add_keywords_into_database(&conn, &metadata_pkg, release_id)?; - add_authors_into_database(&conn, &metadata_pkg, release_id)?; - add_compression_into_database(&conn, compression_algorithms.into_iter(), release_id)?; + add_keywords_into_database(conn, &metadata_pkg, release_id)?; + add_authors_into_database(conn, &metadata_pkg, release_id)?; + add_compression_into_database(conn, compression_algorithms.into_iter(), release_id)?; // Update the crates table with the new release conn.execute( @@ -132,7 +132,7 @@ pub(crate) fn add_package_into_database( /// Adds a build into database pub(crate) fn add_build_into_database( - conn: &Connection, + conn: &mut Client, release_id: i32, res: &BuildResult, ) -> Result { @@ -151,10 +151,10 @@ pub(crate) fn add_build_into_database( &res.build_log, ], )?; - Ok(rows.get(0).get(0)) + Ok(rows[0].get(0)) } -fn initialize_package_in_database(conn: &Connection, pkg: &MetadataPackage) -> Result { +fn initialize_package_in_database(conn: &mut Client, pkg: &MetadataPackage) -> Result { let mut rows = conn.query("SELECT id FROM crates WHERE name = $1", &[&pkg.name])?; // insert crate into database if it is not exists if rows.is_empty() { @@ -163,7 +163,7 @@ fn initialize_package_in_database(conn: &Connection, pkg: &MetadataPackage) -> R &[&pkg.name], )?; } - Ok(rows.get(0).get(0)) + Ok(rows[0].get(0)) } /// Convert dependencies into Vec<(String, String, String)> @@ -250,7 +250,7 @@ fn read_rust_doc(file_path: &Path) -> Result> { /// Adds keywords into database fn add_keywords_into_database( - conn: &Connection, + conn: &mut Client, pkg: &MetadataPackage, release_id: i32, ) -> Result<()> { @@ -259,14 +259,13 @@ fn add_keywords_into_database( let keyword_id: i32 = { let rows = conn.query("SELECT id FROM keywords WHERE slug = $1", &[&slug])?; if !rows.is_empty() { - rows.get(0).get(0) + rows[0].get(0) } else { conn.query( "INSERT INTO keywords (name, slug) VALUES ($1, $2) RETURNING id", &[&keyword, &slug], - )? - .get(0) - .get(0) + )?[0] + .get(0) } }; @@ -282,7 +281,7 @@ fn add_keywords_into_database( /// Adds authors into database fn add_authors_into_database( - conn: &Connection, + conn: &mut Client, pkg: &MetadataPackage, release_id: i32, ) -> Result<()> { @@ -304,15 +303,14 @@ fn add_authors_into_database( let author_id: i32 = { let rows = conn.query("SELECT id FROM authors WHERE slug = $1", &[&slug])?; if !rows.is_empty() { - rows.get(0).get(0) + rows[0].get(0) } else { conn.query( "INSERT INTO authors (name, email, slug) VALUES ($1, $2, $3) RETURNING id", &[&author, &email, &slug], - )? - .get(0) - .get(0) + )?[0] + .get(0) } }; @@ -328,15 +326,12 @@ fn add_authors_into_database( } pub fn update_crate_data_in_database( - conn: &Connection, + conn: &mut Client, name: &str, registry_data: &CrateData, ) -> Result<()> { info!("Updating crate data for {}", name); - let crate_id = conn - .query("SELECT id FROM crates WHERE crates.name = $1", &[&name])? - .get(0) - .get(0); + let crate_id = conn.query("SELECT id FROM crates WHERE crates.name = $1", &[&name])?[0].get(0); update_owners_in_database(conn, ®istry_data.owners, crate_id)?; @@ -345,7 +340,7 @@ pub fn update_crate_data_in_database( /// Adds owners into database fn update_owners_in_database( - conn: &Connection, + conn: &mut Client, owners: &[CrateOwner], crate_id: i32, ) -> Result<()> { @@ -379,9 +374,8 @@ fn update_owners_in_database( RETURNING id ", &[&owner.login, &owner.avatar, &owner.name, &owner.email], - )? - .get(0) - .get(0) + )?[0] + .get(0) }; // add relationship @@ -413,7 +407,7 @@ fn update_owners_in_database( } /// Add the compression algorithms used for this crate to the database -fn add_compression_into_database(conn: &Connection, algorithms: I, release_id: i32) -> Result<()> +fn add_compression_into_database(conn: &mut Client, algorithms: I, release_id: i32) -> Result<()> where I: Iterator, { @@ -421,9 +415,9 @@ where INSERT INTO compression_rels (release, algorithm) VALUES ($1, $2) ON CONFLICT DO NOTHING;"; - let prepared = conn.prepare_cached(sql)?; + let prepared = conn.prepare(sql)?; for alg in algorithms { - prepared.execute(&[&release_id, &(alg as i32)])?; + conn.query(&prepared, &[&release_id, &(alg as i32)])?; } Ok(()) } diff --git a/src/db/blacklist.rs b/src/db/blacklist.rs index 22686f503..56abfd031 100644 --- a/src/db/blacklist.rs +++ b/src/db/blacklist.rs @@ -1,5 +1,5 @@ use failure::{Error, Fail}; -use postgres::Connection; +use postgres::Client; #[derive(Debug, Fail)] enum BlacklistError { @@ -11,18 +11,18 @@ enum BlacklistError { } /// Returns whether the given name is blacklisted. -pub fn is_blacklisted(conn: &Connection, name: &str) -> Result { +pub fn is_blacklisted(conn: &mut Client, name: &str) -> Result { let rows = conn.query( "SELECT COUNT(*) FROM blacklisted_crates WHERE crate_name = $1;", &[&name], )?; - let count: i64 = rows.get(0).get(0); + let count: i64 = rows[0].get(0); Ok(count != 0) } /// Returns the crate names on the blacklist, sorted ascending. -pub fn list_crates(conn: &Connection) -> Result, Error> { +pub fn list_crates(conn: &mut Client) -> Result, Error> { let rows = conn.query( "SELECT crate_name FROM blacklisted_crates ORDER BY crate_name asc;", &[], @@ -32,7 +32,7 @@ pub fn list_crates(conn: &Connection) -> Result, Error> { } /// Adds a crate to the blacklist. -pub fn add_crate(conn: &Connection, name: &str) -> Result<(), Error> { +pub fn add_crate(conn: &mut Client, name: &str) -> Result<(), Error> { if is_blacklisted(conn, name)? { return Err(BlacklistError::CrateAlreadyOnBlacklist(name.into()).into()); } @@ -46,7 +46,7 @@ pub fn add_crate(conn: &Connection, name: &str) -> Result<(), Error> { } /// Removes a crate from the blacklist. -pub fn remove_crate(conn: &Connection, name: &str) -> Result<(), Error> { +pub fn remove_crate(conn: &mut Client, name: &str) -> Result<(), Error> { if !is_blacklisted(conn, name)? { return Err(BlacklistError::CrateNotOnBlacklist(name.into()).into()); } @@ -69,11 +69,11 @@ mod tests { let db = env.db(); // crates are added out of order to verify sorting - add_crate(&db.conn(), "crate A")?; - add_crate(&db.conn(), "crate C")?; - add_crate(&db.conn(), "crate B")?; + add_crate(&mut db.conn(), "crate A")?; + add_crate(&mut db.conn(), "crate C")?; + add_crate(&mut db.conn(), "crate B")?; - assert!(list_crates(&db.conn())? == vec!["crate A", "crate B", "crate C"]); + assert!(list_crates(&mut db.conn())? == vec!["crate A", "crate B", "crate C"]); Ok(()) }); } @@ -83,11 +83,11 @@ mod tests { crate::test::wrapper(|env| { let db = env.db(); - assert!(!is_blacklisted(&db.conn(), "crate foo")?); - add_crate(&db.conn(), "crate foo")?; - assert!(is_blacklisted(&db.conn(), "crate foo")?); - remove_crate(&db.conn(), "crate foo")?; - assert!(!is_blacklisted(&db.conn(), "crate foo")?); + assert!(!is_blacklisted(&mut db.conn(), "crate foo")?); + add_crate(&mut db.conn(), "crate foo")?; + assert!(is_blacklisted(&mut db.conn(), "crate foo")?); + remove_crate(&mut db.conn(), "crate foo")?; + assert!(!is_blacklisted(&mut db.conn(), "crate foo")?); Ok(()) }); } @@ -97,9 +97,9 @@ mod tests { crate::test::wrapper(|env| { let db = env.db(); - add_crate(&db.conn(), "crate foo")?; - assert!(add_crate(&db.conn(), "crate foo").is_err()); - add_crate(&db.conn(), "crate bar")?; + add_crate(&mut db.conn(), "crate foo")?; + assert!(add_crate(&mut db.conn(), "crate foo").is_err()); + add_crate(&mut db.conn(), "crate bar")?; Ok(()) }); @@ -110,7 +110,7 @@ mod tests { crate::test::wrapper(|env| { let db = env.db(); - assert!(remove_crate(&db.conn(), "crate foo").is_err()); + assert!(remove_crate(&mut db.conn(), "crate foo").is_err()); Ok(()) }); diff --git a/src/db/delete.rs b/src/db/delete.rs index 26c71137b..0f354d3d3 100644 --- a/src/db/delete.rs +++ b/src/db/delete.rs @@ -1,6 +1,6 @@ use crate::Storage; use failure::{Error, Fail}; -use postgres::Connection; +use postgres::Client; /// List of directories in docs.rs's underlying storage (either the database or S3) containing a /// subdirectory named after the crate. Those subdirectories will be deleted. @@ -12,7 +12,7 @@ enum CrateDeletionError { MissingCrate(String), } -pub fn delete_crate(conn: &Connection, storage: &Storage, name: &str) -> Result<(), Error> { +pub fn delete_crate(conn: &mut Client, storage: &Storage, name: &str) -> Result<(), Error> { let crate_id = get_id(conn, name)?; delete_crate_from_database(conn, name, crate_id)?; @@ -24,7 +24,7 @@ pub fn delete_crate(conn: &Connection, storage: &Storage, name: &str) -> Result< } pub fn delete_version( - conn: &Connection, + conn: &mut Client, storage: &Storage, name: &str, version: &str, @@ -38,7 +38,7 @@ pub fn delete_version( Ok(()) } -fn get_id(conn: &Connection, name: &str) -> Result { +fn get_id(conn: &mut Client, name: &str) -> Result { let crate_id_res = conn.query("SELECT id FROM crates WHERE name = $1", &[&name])?; if let Some(row) = crate_id_res.into_iter().next() { Ok(row.get("id")) @@ -56,12 +56,12 @@ const METADATA: &[(&str, &str)] = &[ ("compression_rels", "release"), ]; -fn delete_version_from_database(conn: &Connection, name: &str, version: &str) -> Result<(), Error> { +fn delete_version_from_database(conn: &mut Client, name: &str, version: &str) -> Result<(), Error> { let crate_id = get_id(conn, name)?; - let transaction = conn.transaction()?; + let mut transaction = conn.transaction()?; for &(table, column) in METADATA { transaction.execute( - &format!("DELETE FROM {} WHERE {} IN (SELECT id FROM releases WHERE crate_id = $1 AND version = $2)", table, column), + format!("DELETE FROM {} WHERE {} IN (SELECT id FROM releases WHERE crate_id = $1 AND version = $2)", table, column).as_str(), &[&crate_id, &version], )?; } @@ -88,8 +88,8 @@ fn delete_version_from_database(conn: &Connection, name: &str, version: &str) -> transaction.commit().map_err(Into::into) } -fn delete_crate_from_database(conn: &Connection, name: &str, crate_id: i32) -> Result<(), Error> { - let transaction = conn.transaction()?; +fn delete_crate_from_database(conn: &mut Client, name: &str, crate_id: i32) -> Result<(), Error> { + let mut transaction = conn.transaction()?; transaction.execute( "DELETE FROM sandbox_overrides WHERE crate_name = $1", @@ -97,10 +97,11 @@ fn delete_crate_from_database(conn: &Connection, name: &str, crate_id: i32) -> R )?; for &(table, column) in METADATA { transaction.execute( - &format!( + format!( "DELETE FROM {} WHERE {} IN (SELECT id FROM releases WHERE crate_id = $1)", table, column - ), + ) + .as_str(), &[&crate_id], )?; } @@ -119,15 +120,15 @@ mod tests { use super::*; use crate::test::{assert_success, wrapper}; use failure::Error; - use postgres::Connection; + use postgres::Client; - fn crate_exists(conn: &Connection, name: &str) -> Result { + fn crate_exists(conn: &mut Client, name: &str) -> Result { Ok(!conn .query("SELECT * FROM crates WHERE name = $1;", &[&name])? .is_empty()) } - fn release_exists(conn: &Connection, id: i32) -> Result { + fn release_exists(conn: &mut Client, id: i32) -> Result { Ok(!conn .query("SELECT * FROM releases WHERE id = $1;", &[&id])? .is_empty()) @@ -151,25 +152,24 @@ mod tests { .create()?; let pkg2_id = env.fake_release().name("package-2").create()?; - assert!(crate_exists(&db.conn(), "package-1")?); - assert!(crate_exists(&db.conn(), "package-2")?); - assert!(release_exists(&db.conn(), pkg1_v1_id)?); - assert!(release_exists(&db.conn(), pkg1_v2_id)?); - assert!(release_exists(&db.conn(), pkg2_id)?); + assert!(crate_exists(&mut db.conn(), "package-1")?); + assert!(crate_exists(&mut db.conn(), "package-2")?); + assert!(release_exists(&mut db.conn(), pkg1_v1_id)?); + assert!(release_exists(&mut db.conn(), pkg1_v2_id)?); + assert!(release_exists(&mut db.conn(), pkg2_id)?); let pkg1_id = &db .conn() - .query("SELECT id FROM crates WHERE name = 'package-1';", &[])? - .get(0) + .query("SELECT id FROM crates WHERE name = 'package-1';", &[])?[0] .get("id"); - delete_crate_from_database(&db.conn(), "package-1", *pkg1_id)?; + delete_crate_from_database(&mut db.conn(), "package-1", *pkg1_id)?; - assert!(!crate_exists(&db.conn(), "package-1")?); - assert!(crate_exists(&db.conn(), "package-2")?); - assert!(!release_exists(&db.conn(), pkg1_v1_id)?); - assert!(!release_exists(&db.conn(), pkg1_v2_id)?); - assert!(release_exists(&db.conn(), pkg2_id)?); + assert!(!crate_exists(&mut db.conn(), "package-1")?); + assert!(crate_exists(&mut db.conn(), "package-2")?); + assert!(!release_exists(&mut db.conn(), pkg1_v1_id)?); + assert!(!release_exists(&mut db.conn(), pkg1_v2_id)?); + assert!(release_exists(&mut db.conn(), pkg2_id)?); Ok(()) }); @@ -178,7 +178,7 @@ mod tests { #[test] fn test_delete_version() { wrapper(|env| { - fn authors(conn: &Connection, crate_id: i32) -> Result, Error> { + fn authors(conn: &mut Client, crate_id: i32) -> Result, Error> { Ok(conn .query( "SELECT name FROM authors @@ -205,8 +205,8 @@ mod tests { .version("2.0.0") .author("Peter Rabbit") .create()?; - assert!(release_exists(&db.conn(), v1)?); - assert!(release_exists(&db.conn(), v2)?); + assert!(release_exists(&mut db.conn(), v1)?); + assert!(release_exists(&mut db.conn(), v2)?); let crate_id = db .conn() .query("SELECT crate_id FROM releases WHERE id = $1", &[&v1])? @@ -215,15 +215,15 @@ mod tests { .unwrap() .get(0); assert_eq!( - authors(&db.conn(), crate_id)?, + authors(&mut db.conn(), crate_id)?, vec!["malicious actor".to_string(), "Peter Rabbit".to_string()] ); - delete_version(&db.conn(), &*env.storage(), "a", "1.0.0")?; - assert!(!release_exists(&db.conn(), v1)?); - assert!(release_exists(&db.conn(), v2)?); + delete_version(&mut db.conn(), &*env.storage(), "a", "1.0.0")?; + assert!(!release_exists(&mut db.conn(), v1)?); + assert!(release_exists(&mut db.conn(), v2)?); assert_eq!( - authors(&db.conn(), crate_id)?, + authors(&mut db.conn(), crate_id)?, vec!["Peter Rabbit".to_string()] ); diff --git a/src/db/migrate.rs b/src/db/migrate.rs index e4c6f41ae..ad4361439 100644 --- a/src/db/migrate.rs +++ b/src/db/migrate.rs @@ -2,7 +2,7 @@ use crate::error::Result as CratesfyiResult; use log::info; -use postgres::{transaction::Transaction, Connection, Error as PostgresError}; +use postgres::{Client, Error as PostgresError, Transaction}; use schemamama::{Migration, Migrator, Version}; use schemamama_postgres::{PostgresAdapter, PostgresMigration}; @@ -29,7 +29,7 @@ macro_rules! migration { } } impl PostgresMigration for Amigration { - fn up(&self, transaction: &Transaction) -> Result<(), PostgresError> { + fn up(&self, transaction: &mut Transaction) -> Result<(), PostgresError> { info!( "Applying migration {}: {}", self.version(), @@ -37,7 +37,7 @@ macro_rules! migration { ); transaction.batch_execute($up).map(|_| ()) } - fn down(&self, transaction: &Transaction) -> Result<(), PostgresError> { + fn down(&self, transaction: &mut Transaction) -> Result<(), PostgresError> { info!( "Removing migration {}: {}", self.version(), @@ -50,12 +50,13 @@ macro_rules! migration { }}; } -pub fn migrate(version: Option, conn: &Connection) -> CratesfyiResult<()> { +pub fn migrate(version: Option, conn: &mut Client) -> CratesfyiResult<()> { conn.execute( "CREATE TABLE IF NOT EXISTS database_versions (version BIGINT PRIMARY KEY);", &[], )?; - let adapter = PostgresAdapter::with_metadata_table(conn, "database_versions"); + let mut adapter = PostgresAdapter::new(conn); + adapter.set_metadata_table("database_versions"); let mut migrator = Migrator::new(adapter); diff --git a/src/db/mod.rs b/src/db/mod.rs index 9783cea23..e1f8db097 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -5,7 +5,7 @@ pub(crate) use self::add_package::{add_build_into_database, add_package_into_dat pub use self::delete::{delete_crate, delete_version}; pub use self::file::add_path_into_database; pub use self::migrate::migrate; -pub(crate) use self::pool::PoolConnection; +pub(crate) use self::pool::PoolClient; pub use self::pool::{Pool, PoolError}; mod add_package; diff --git a/src/db/pool.rs b/src/db/pool.rs index 910c7b1c1..db9b3d235 100644 --- a/src/db/pool.rs +++ b/src/db/pool.rs @@ -1,14 +1,14 @@ use crate::Config; -use postgres::Connection; +use postgres::{Client, NoTls}; use r2d2_postgres::PostgresConnectionManager; -pub(crate) type PoolConnection = r2d2::PooledConnection; +pub(crate) type PoolClient = r2d2::PooledConnection>; const DEFAULT_SCHEMA: &str = "public"; #[derive(Debug, Clone)] pub struct Pool { - pool: r2d2::Pool, + pool: r2d2::Pool>, } impl Pool { @@ -24,12 +24,11 @@ impl Pool { fn new_inner(config: &Config, schema: &str) -> Result { crate::web::metrics::MAX_DB_CONNECTIONS.set(config.max_pool_size as i64); - let manager = PostgresConnectionManager::new( - config.database_url.as_str(), - r2d2_postgres::TlsMode::None, - ) - .map_err(PoolError::InvalidDatabaseUrl)?; - + let url = config + .database_url + .parse() + .map_err(PoolError::InvalidDatabaseUrl)?; + let manager = PostgresConnectionManager::new(url, NoTls); let pool = r2d2::Pool::builder() .max_size(config.max_pool_size) .min_idle(Some(config.min_pool_idle)) @@ -40,12 +39,12 @@ impl Pool { Ok(Pool { pool }) } - pub fn get(&self) -> Result { + pub fn get(&self) -> Result { match self.pool.get() { Ok(conn) => Ok(conn), Err(err) => { crate::web::metrics::FAILED_DB_CONNECTIONS.inc(); - Err(PoolError::ConnectionError(err)) + Err(PoolError::ClientError(err)) } } } @@ -72,11 +71,11 @@ impl SetSchema { } } -impl r2d2::CustomizeConnection for SetSchema { - fn on_acquire(&self, conn: &mut Connection) -> Result<(), postgres::Error> { +impl r2d2::CustomizeConnection for SetSchema { + fn on_acquire(&self, conn: &mut Client) -> Result<(), postgres::Error> { if self.schema != DEFAULT_SCHEMA { conn.execute( - &format!("SET search_path TO {}, {};", self.schema, DEFAULT_SCHEMA), + format!("SET search_path TO {}, {};", self.schema, DEFAULT_SCHEMA).as_str(), &[], )?; } @@ -93,5 +92,5 @@ pub enum PoolError { PoolCreationFailed(#[fail(cause)] r2d2::Error), #[fail(display = "failed to get a database connection")] - ConnectionError(#[fail(cause)] r2d2::Error), + ClientError(#[fail(cause)] r2d2::Error), } diff --git a/src/docbuilder/limits.rs b/src/docbuilder/limits.rs index e641afdfc..58f53a8ae 100644 --- a/src/docbuilder/limits.rs +++ b/src/docbuilder/limits.rs @@ -1,5 +1,5 @@ use crate::error::Result; -use postgres::Connection; +use postgres::Client; use serde::Serialize; use std::time::Duration; @@ -25,7 +25,7 @@ impl Default for Limits { } impl Limits { - pub(crate) fn for_crate(conn: &Connection, name: &str) -> Result { + pub(crate) fn for_crate(conn: &mut Client, name: &str) -> Result { let mut limits = Self::default(); let res = conn.query( @@ -33,7 +33,7 @@ impl Limits { &[&name], )?; if !res.is_empty() { - let row = res.get(0); + let row = &res[0]; if let Some(memory) = row.get::<_, Option>("max_memory_bytes") { limits.memory = memory as usize; } @@ -81,7 +81,7 @@ mod test { let krate = "hexponent"; // limits work if no crate has limits set - let hexponent = Limits::for_crate(&db.conn(), krate)?; + let hexponent = Limits::for_crate(&mut db.conn(), krate)?; assert_eq!(hexponent, Limits::default()); db.conn().query( @@ -89,7 +89,7 @@ mod test { &[&krate], )?; // limits work if crate has limits set - let hexponent = Limits::for_crate(&db.conn(), krate)?; + let hexponent = Limits::for_crate(&mut db.conn(), krate)?; assert_eq!( hexponent, Limits { @@ -111,7 +111,7 @@ mod test { VALUES ($1, $2, $3, $4)", &[&krate, &(limits.memory as i64), &(limits.timeout.as_secs() as i32), &(limits.targets as i32)] )?; - assert_eq!(limits, Limits::for_crate(&db.conn(), krate)?); + assert_eq!(limits, Limits::for_crate(&mut db.conn(), krate)?); Ok(()) }); } diff --git a/src/docbuilder/mod.rs b/src/docbuilder/mod.rs index 8aedff9aa..ede7d2ac8 100644 --- a/src/docbuilder/mod.rs +++ b/src/docbuilder/mod.rs @@ -67,8 +67,8 @@ impl DocBuilder { fn load_database_cache(&mut self) -> Result<()> { debug!("Loading database cache"); - let conn = self.db.get()?; - for row in &conn.query( + let mut conn = self.db.get()?; + for row in &mut conn.query( "SELECT name, version FROM crates, releases \ WHERE crates.id = releases.crate_id", &[], diff --git a/src/docbuilder/queue.rs b/src/docbuilder/queue.rs index 9be78eb20..ae3bfc76e 100644 --- a/src/docbuilder/queue.rs +++ b/src/docbuilder/queue.rs @@ -10,7 +10,7 @@ impl DocBuilder { /// Updates registry index repository and adds new crates into build queue. /// Returns the number of crates added pub fn get_new_crates(&mut self) -> Result { - let conn = self.db.get()?; + let mut conn = self.db.get()?; let diff = self.index.diff()?; let (mut changes, oid) = diff.peek_changes()?; let mut crates_added = 0; @@ -42,7 +42,7 @@ impl DocBuilder { } ChangeKind::Added => { - let priority = get_crate_priority(&conn, &krate.name)?; + let priority = get_crate_priority(&mut conn, &krate.name)?; match self .build_queue diff --git a/src/docbuilder/rustwide_builder.rs b/src/docbuilder/rustwide_builder.rs index 4ef38303c..26da6eccd 100644 --- a/src/docbuilder/rustwide_builder.rs +++ b/src/docbuilder/rustwide_builder.rs @@ -204,8 +204,8 @@ impl RustwideBuilder { info!("building a dummy crate to get essential files"); - let conn = self.db.get()?; - let limits = Limits::for_crate(&conn, DUMMY_CRATE_NAME)?; + let mut conn = self.db.get()?; + let limits = Limits::for_crate(&mut conn, DUMMY_CRATE_NAME)?; let mut build_dir = self .workspace @@ -317,14 +317,14 @@ impl RustwideBuilder { info!("building package {} {}", name, version); - let conn = self.db.get()?; + let mut conn = self.db.get()?; - if is_blacklisted(&conn, name)? { + if is_blacklisted(&mut conn, name)? { info!("skipping build of {}, crate has been blacklisted", name); return Ok(false); } - let limits = Limits::for_crate(&conn, name)?; + let limits = Limits::for_crate(&mut conn, name)?; let mut build_dir = self.workspace.build_dir(&format!("{}-{}", name, version)); build_dir.purge()?; @@ -410,7 +410,7 @@ impl RustwideBuilder { }; let release_id = add_package_into_database( - &conn, + &mut conn, res.cargo_metadata.root(), &build.host_source_dir(), &res.result, @@ -423,11 +423,11 @@ impl RustwideBuilder { algs, )?; - add_build_into_database(&conn, release_id, &res.result)?; + add_build_into_database(&mut conn, release_id, &res.result)?; // Some crates.io crate data is mutable, so we proactively update it during a release match doc_builder.index.api().get_crate_data(name) { - Ok(crate_data) => update_crate_data_in_database(&conn, name, &crate_data)?, + Ok(crate_data) => update_crate_data_in_database(&mut conn, name, &crate_data)?, Err(err) => warn!("{:#?}", err), } diff --git a/src/storage/database.rs b/src/storage/database.rs index 27dcf6c32..9d6343607 100644 --- a/src/storage/database.rs +++ b/src/storage/database.rs @@ -2,7 +2,7 @@ use super::{Blob, StorageTransaction}; use crate::db::Pool; use chrono::{DateTime, NaiveDateTime, Utc}; use failure::Error; -use postgres::transaction::Transaction; +use postgres::Transaction; pub(crate) struct DatabaseBackend { pool: Pool, @@ -15,8 +15,8 @@ impl DatabaseBackend { pub(super) fn exists(&self, path: &str) -> Result { let query = "SELECT COUNT(*) > 0 FROM files WHERE path = $1"; - let conn = self.pool.get()?; - Ok(conn.query(query, &[&path])?.get(0).get(0)) + let mut conn = self.pool.get()?; + Ok(conn.query(query, &[&path])?[0].get(0)) } pub(super) fn get(&self, path: &str, max_size: usize) -> Result { @@ -41,7 +41,7 @@ impl DatabaseBackend { if rows.is_empty() { Err(super::PathNotFoundError.into()) } else { - let row = rows.get(0); + let row = &rows[0]; if row.get("is_too_big") { return Err(std::io::Error::new( @@ -65,20 +65,20 @@ impl DatabaseBackend { } } - pub(super) fn start_connection(&self) -> Result { - Ok(DatabaseConnection { + pub(super) fn start_connection(&self) -> Result { + Ok(DatabaseClient { conn: self.pool.get()?, }) } } -pub(super) struct DatabaseConnection { - conn: crate::db::PoolConnection, +pub(super) struct DatabaseClient { + conn: crate::db::PoolClient, } -impl DatabaseConnection { +impl DatabaseClient { pub(super) fn start_storage_transaction( - &self, + &mut self, ) -> Result, Error> { Ok(DatabaseStorageTransaction { transaction: self.conn.transaction()?, diff --git a/src/storage/mod.rs b/src/storage/mod.rs index b110b4ff0..bdb643ffe 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -125,7 +125,7 @@ impl Storage { where F: FnOnce(&mut dyn StorageTransaction) -> Result, { - let conn; + let mut conn; let mut trans: Box = match &self.backend { StorageBackend::Database(db) => { conn = db.start_connection()?; diff --git a/src/test/fakes.rs b/src/test/fakes.rs index c9ecd9f7a..395f265f9 100644 --- a/src/test/fakes.rs +++ b/src/test/fakes.rs @@ -248,7 +248,7 @@ impl<'a> FakeRelease<'a> { fs::write(crate_dir.join("README.md"), markdown)?; } let release_id = crate::db::add_package_into_database( - &db.conn(), + &mut db.conn(), &package, crate_dir, &self.build_result, @@ -261,11 +261,11 @@ impl<'a> FakeRelease<'a> { algs, )?; crate::db::update_crate_data_in_database( - &db.conn(), + &mut db.conn(), &package.name, &self.registry_crate_data, )?; - crate::db::add_build_into_database(&db.conn(), release_id, &self.build_result)?; + crate::db::add_build_into_database(&mut db.conn(), release_id, &self.build_result)?; Ok(release_id) } diff --git a/src/test/mod.rs b/src/test/mod.rs index f2f315f72..5b0e4ffdf 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -1,6 +1,6 @@ mod fakes; -use crate::db::{Pool, PoolConnection}; +use crate::db::{Pool, PoolClient}; use crate::storage::Storage; use crate::web::Server; use crate::BuildQueue; @@ -8,7 +8,7 @@ use crate::Config; use failure::Error; use log::error; use once_cell::unsync::OnceCell; -use postgres::Connection; +use postgres::Client as Connection; use reqwest::{ blocking::{Client, RequestBuilder}, Method, @@ -229,7 +229,7 @@ impl TestDatabase { // test to create a fresh instance of the database to run within. let schema = format!("docs_rs_test_schema_{}", rand::random::()); - let conn = Connection::connect(config.database_url.as_str(), postgres::TlsMode::None)?; + let mut conn = Connection::connect(&config.database_url, postgres::NoTls)?; conn.batch_execute(&format!( " CREATE SCHEMA {0}; @@ -237,7 +237,7 @@ impl TestDatabase { ", schema ))?; - crate::db::migrate(None, &conn)?; + crate::db::migrate(None, &mut conn)?; // Move all sequence start positions 10000 apart to avoid overlapping primary keys let query: String = conn @@ -272,7 +272,7 @@ impl TestDatabase { self.pool.clone() } - pub(crate) fn conn(&self) -> PoolConnection { + pub(crate) fn conn(&self) -> PoolClient { self.pool .get() .expect("failed to get a connection out of the pool") @@ -281,11 +281,11 @@ impl TestDatabase { impl Drop for TestDatabase { fn drop(&mut self) { - crate::db::migrate(Some(0), &self.conn()).expect("downgrading database works"); - if let Err(e) = self - .conn() - .execute(&format!("DROP SCHEMA {} CASCADE;", self.schema), &[]) - { + crate::db::migrate(Some(0), &mut self.conn()).expect("downgrading database works"); + if let Err(e) = self.conn().execute( + format!("DROP SCHEMA {} CASCADE;", self.schema).as_str(), + &[], + ) { error!("failed to drop test schema {}: {}", self.schema, e); } } diff --git a/src/utils/daemon.rs b/src/utils/daemon.rs index 50e9ba759..990516f5d 100644 --- a/src/utils/daemon.rs +++ b/src/utils/daemon.rs @@ -88,7 +88,7 @@ pub fn start_daemon( let now = Utc::now(); if now.hour() == 23 && now.minute() == 55 { info!("Updating release activity"); - update_release_activity(&*cloned_db.get()?)?; + update_release_activity(&mut *cloned_db.get()?)?; } Ok(()) }, diff --git a/src/utils/github_updater.rs b/src/utils/github_updater.rs index 00fea698d..def144a46 100644 --- a/src/utils/github_updater.rs +++ b/src/utils/github_updater.rs @@ -3,7 +3,7 @@ use crate::{db::Pool, Config}; use chrono::{DateTime, Utc}; use failure::err_msg; use log::{debug, warn}; -use postgres::Connection; +use postgres::Client; use regex::Regex; use reqwest::header::{HeaderValue, ACCEPT, AUTHORIZATION, USER_AGENT}; use serde::Deserialize; @@ -62,7 +62,7 @@ impl GithubUpdater { return Ok(()); } - let conn = self.pool.get()?; + let mut conn = self.pool.get()?; // TODO: This query assumes repository field in Cargo.toml is // always the same across all versions of a crate let rows = conn.query( @@ -85,7 +85,7 @@ impl GithubUpdater { let repository_url: String = row.get(2); debug!("Updating {}", crate_name); - if let Err(err) = self.update_crate(&conn, crate_id, &repository_url) { + if let Err(err) = self.update_crate(&mut conn, crate_id, &repository_url) { if self.is_rate_limited()? { warn!("Skipping remaining updates because of rate limit"); return Ok(()); @@ -120,7 +120,7 @@ impl GithubUpdater { Ok(response.resources.core.remaining == 0) } - fn update_crate(&self, conn: &Connection, crate_id: i32, repository_url: &str) -> Result<()> { + fn update_crate(&self, conn: &mut Client, crate_id: i32, repository_url: &str) -> Result<()> { let path = get_github_path(repository_url).ok_or_else(|| err_msg("Failed to get github path"))?; let fields = self.get_github_fields(&path)?; diff --git a/src/utils/queue.rs b/src/utils/queue.rs index 1e3952994..76ecb618c 100644 --- a/src/utils/queue.rs +++ b/src/utils/queue.rs @@ -1,12 +1,12 @@ //! Utilities for interacting with the build queue use crate::error::Result; -use postgres::Connection; +use postgres::Client; const DEFAULT_PRIORITY: i32 = 0; /// Get the build queue priority for a crate -pub fn get_crate_priority(conn: &Connection, name: &str) -> Result { +pub fn get_crate_priority(conn: &mut Client, name: &str) -> Result { // Search the `priority` table for a priority where the crate name matches the stored pattern let query = conn.query( "SELECT priority FROM crate_priorities WHERE $1 LIKE pattern LIMIT 1", @@ -26,7 +26,7 @@ pub fn get_crate_priority(conn: &Connection, name: &str) -> Result { /// Note: `pattern` is used in a `LIKE` statement, so it must follow the postgres like syntax /// /// [`pattern`]: https://www.postgresql.org/docs/8.3/functions-matching.html -pub fn set_crate_priority(conn: &Connection, pattern: &str, priority: i32) -> Result<()> { +pub fn set_crate_priority(conn: &mut Client, pattern: &str, priority: i32) -> Result<()> { conn.query( "INSERT INTO crate_priorities (pattern, priority) VALUES ($1, $2)", &[&pattern, &priority], @@ -37,7 +37,7 @@ pub fn set_crate_priority(conn: &Connection, pattern: &str, priority: i32) -> Re /// Remove a pattern from the priority table, returning the priority that it was associated with or `None` /// if nothing was removed -pub fn remove_crate_priority(conn: &Connection, pattern: &str) -> Result> { +pub fn remove_crate_priority(conn: &mut Client, pattern: &str) -> Result> { let query = conn.query( "DELETE FROM crate_priorities WHERE pattern = $1 RETURNING priority", &[&pattern], @@ -56,28 +56,34 @@ mod tests { wrapper(|env| { let db = env.db(); - set_crate_priority(&db.conn(), "cratesfyi-%", -100)?; - assert_eq!(get_crate_priority(&db.conn(), "cratesfyi-database")?, -100); - assert_eq!(get_crate_priority(&db.conn(), "cratesfyi-")?, -100); - assert_eq!(get_crate_priority(&db.conn(), "cratesfyi-s3")?, -100); - assert_eq!(get_crate_priority(&db.conn(), "cratesfyi-webserver")?, -100); + set_crate_priority(&mut db.conn(), "cratesfyi-%", -100)?; assert_eq!( - get_crate_priority(&db.conn(), "cratesfyi")?, + get_crate_priority(&mut db.conn(), "cratesfyi-database")?, + -100 + ); + assert_eq!(get_crate_priority(&mut db.conn(), "cratesfyi-")?, -100); + assert_eq!(get_crate_priority(&mut db.conn(), "cratesfyi-s3")?, -100); + assert_eq!( + get_crate_priority(&mut db.conn(), "cratesfyi-webserver")?, + -100 + ); + assert_eq!( + get_crate_priority(&mut db.conn(), "cratesfyi")?, DEFAULT_PRIORITY ); - set_crate_priority(&db.conn(), "_c_", 100)?; - assert_eq!(get_crate_priority(&db.conn(), "rcc")?, 100); - assert_eq!(get_crate_priority(&db.conn(), "rc")?, DEFAULT_PRIORITY); + set_crate_priority(&mut db.conn(), "_c_", 100)?; + assert_eq!(get_crate_priority(&mut db.conn(), "rcc")?, 100); + assert_eq!(get_crate_priority(&mut db.conn(), "rc")?, DEFAULT_PRIORITY); - set_crate_priority(&db.conn(), "hexponent", 10)?; - assert_eq!(get_crate_priority(&db.conn(), "hexponent")?, 10); + set_crate_priority(&mut db.conn(), "hexponent", 10)?; + assert_eq!(get_crate_priority(&mut db.conn(), "hexponent")?, 10); assert_eq!( - get_crate_priority(&db.conn(), "hexponents")?, + get_crate_priority(&mut db.conn(), "hexponents")?, DEFAULT_PRIORITY ); assert_eq!( - get_crate_priority(&db.conn(), "floathexponent")?, + get_crate_priority(&mut db.conn(), "floathexponent")?, DEFAULT_PRIORITY ); @@ -90,15 +96,15 @@ mod tests { wrapper(|env| { let db = env.db(); - set_crate_priority(&db.conn(), "cratesfyi-%", -100)?; - assert_eq!(get_crate_priority(&db.conn(), "cratesfyi-")?, -100); + set_crate_priority(&mut db.conn(), "cratesfyi-%", -100)?; + assert_eq!(get_crate_priority(&mut db.conn(), "cratesfyi-")?, -100); assert_eq!( - remove_crate_priority(&db.conn(), "cratesfyi-%")?, + remove_crate_priority(&mut db.conn(), "cratesfyi-%")?, Some(-100) ); assert_eq!( - get_crate_priority(&db.conn(), "cratesfyi-")?, + get_crate_priority(&mut db.conn(), "cratesfyi-")?, DEFAULT_PRIORITY ); @@ -111,14 +117,20 @@ mod tests { wrapper(|env| { let db = env.db(); - set_crate_priority(&db.conn(), "cratesfyi-%", -100)?; + set_crate_priority(&mut db.conn(), "cratesfyi-%", -100)?; - assert_eq!(get_crate_priority(&db.conn(), "cratesfyi-database")?, -100); - assert_eq!(get_crate_priority(&db.conn(), "cratesfyi-")?, -100); - assert_eq!(get_crate_priority(&db.conn(), "cratesfyi-s3")?, -100); - assert_eq!(get_crate_priority(&db.conn(), "cratesfyi-webserver")?, -100); assert_eq!( - get_crate_priority(&db.conn(), "unrelated")?, + get_crate_priority(&mut db.conn(), "cratesfyi-database")?, + -100 + ); + assert_eq!(get_crate_priority(&mut db.conn(), "cratesfyi-")?, -100); + assert_eq!(get_crate_priority(&mut db.conn(), "cratesfyi-s3")?, -100); + assert_eq!( + get_crate_priority(&mut db.conn(), "cratesfyi-webserver")?, + -100 + ); + assert_eq!( + get_crate_priority(&mut db.conn(), "unrelated")?, DEFAULT_PRIORITY ); @@ -132,17 +144,20 @@ mod tests { let db = env.db(); assert_eq!( - get_crate_priority(&db.conn(), "cratesfyi")?, + get_crate_priority(&mut db.conn(), "cratesfyi")?, + DEFAULT_PRIORITY + ); + assert_eq!(get_crate_priority(&mut db.conn(), "rcc")?, DEFAULT_PRIORITY); + assert_eq!( + get_crate_priority(&mut db.conn(), "lasso")?, DEFAULT_PRIORITY ); - assert_eq!(get_crate_priority(&db.conn(), "rcc")?, DEFAULT_PRIORITY); - assert_eq!(get_crate_priority(&db.conn(), "lasso")?, DEFAULT_PRIORITY); assert_eq!( - get_crate_priority(&db.conn(), "hexponent")?, + get_crate_priority(&mut db.conn(), "hexponent")?, DEFAULT_PRIORITY ); assert_eq!( - get_crate_priority(&db.conn(), "rust4lyfe")?, + get_crate_priority(&mut db.conn(), "rust4lyfe")?, DEFAULT_PRIORITY ); diff --git a/src/utils/release_activity_updater.rs b/src/utils/release_activity_updater.rs index 71e0032bc..f271059af 100644 --- a/src/utils/release_activity_updater.rs +++ b/src/utils/release_activity_updater.rs @@ -1,27 +1,28 @@ use crate::error::Result; use chrono::{Duration, Utc}; -use postgres::Connection; +use postgres::Client; use serde_json::{Map, Value}; -pub fn update_release_activity(conn: &Connection) -> Result<()> { +pub fn update_release_activity(conn: &mut Client) -> Result<()> { let mut dates = Vec::with_capacity(30); let mut crate_counts = Vec::with_capacity(30); let mut failure_counts = Vec::with_capacity(30); for day in 0..30 { let rows = conn.query( - &format!( + format!( "SELECT COUNT(*) FROM releases WHERE release_time < NOW() - INTERVAL '{} day' AND release_time > NOW() - INTERVAL '{} day'", day, day + 1 - ), + ) + .as_str(), &[], )?; let failures_count_rows = conn.query( - &format!( + format!( "SELECT COUNT(*) FROM releases WHERE is_library = TRUE AND @@ -30,12 +31,13 @@ pub fn update_release_activity(conn: &Connection) -> Result<()> { release_time > NOW() - INTERVAL '{} day'", day, day + 1 - ), + ) + .as_str(), &[], )?; - let release_count: i64 = rows.get(0).get(0); - let failure_count: i64 = failures_count_rows.get(0).get(0); + let release_count: i64 = rows[0].get(0); + let failure_count: i64 = failures_count_rows[0].get(0); let now = Utc::now().naive_utc(); let date = now - Duration::days(day); diff --git a/src/web/builds.rs b/src/web/builds.rs index f4bc80e6e..f807ee93a 100644 --- a/src/web/builds.rs +++ b/src/web/builds.rs @@ -42,8 +42,8 @@ pub fn build_list_handler(req: &mut Request) -> IronResult { let version = cexpect!(req, router.find("version")); let req_build_id: i32 = router.find("id").unwrap_or("0").parse().unwrap_or(0); - let conn = extension!(req, Pool).get()?; - let limits = ctry!(req, Limits::for_crate(&conn, name)); + let mut conn = extension!(req, Pool).get()?; + let limits = ctry!(req, Limits::for_crate(&mut conn, name)); let query = ctry!( req, @@ -111,7 +111,7 @@ pub fn build_list_handler(req: &mut Request) -> IronResult { Ok(resp) } else { BuildsPage { - metadata: MetaData::from_crate(&conn, &name, &version), + metadata: MetaData::from_crate(&mut conn, &name, &version), builds, build_details, limits, diff --git a/src/web/crate_details.rs b/src/web/crate_details.rs index cc608bd10..032ae5614 100644 --- a/src/web/crate_details.rs +++ b/src/web/crate_details.rs @@ -4,7 +4,7 @@ use crate::{db::Pool, impl_webpage, web::page::WebPage}; use chrono::{DateTime, NaiveDateTime, Utc}; use iron::prelude::*; use iron::{status, Url}; -use postgres::Connection; +use postgres::Client; use router::Router; use serde::{ser::Serializer, Serialize}; use serde_json::Value; @@ -67,7 +67,7 @@ pub struct Release { } impl CrateDetails { - pub fn new(conn: &Connection, name: &str, version: &str) -> Option { + pub fn new(conn: &mut Client, name: &str, version: &str) -> Option { // get all stuff, I love you rustfmt let query = " SELECT @@ -107,7 +107,7 @@ impl CrateDetails { let krate = if rows.is_empty() { return None; } else { - rows.get(0) + &rows[0] }; let crate_id: i32 = krate.get("crate_id"); @@ -125,7 +125,7 @@ impl CrateDetails { versions.reverse(); versions .iter() - .map(|version| map_to_release(&conn, crate_id, version.to_string())) + .map(|version| map_to_release(conn, crate_id, version.to_string())) .collect() }; @@ -241,7 +241,7 @@ impl CrateDetails { } } -fn map_to_release(conn: &Connection, crate_id: i32, version: String) -> Release { +fn map_to_release(conn: &mut Client, crate_id: i32, version: String) -> Release { let rows = conn .query( "SELECT build_status, @@ -285,11 +285,11 @@ pub fn crate_details_handler(req: &mut Request) -> IronResult { let name = cexpect!(req, router.find("name")); let req_version = router.find("version"); - let conn = extension!(req, Pool).get()?; + let mut conn = extension!(req, Pool).get()?; - match match_version(&conn, &name, req_version).and_then(|m| m.assume_exact()) { + match match_version(&mut conn, &name, req_version).and_then(|m| m.assume_exact()) { Some(MatchSemver::Exact((version, _))) => { - let details = cexpect!(req, CrateDetails::new(&conn, &name, &version)); + let details = cexpect!(req, CrateDetails::new(&mut conn, &name, &version)); CrateDetailsPage { details }.into_response(req) } @@ -326,7 +326,7 @@ mod tests { version: &str, expected_last_successful_build: Option<&str>, ) -> Result<(), Error> { - let details = CrateDetails::new(&db.conn(), package, version) + let details = CrateDetails::new(&mut db.conn(), package, version) .ok_or_else(|| failure::err_msg("could not fetch crate details"))?; assert_eq!( @@ -454,7 +454,7 @@ mod tests { .binary(true) .create()?; - let details = CrateDetails::new(&db.conn(), "foo", "0.2.0").unwrap(); + let details = CrateDetails::new(&mut db.conn(), "foo", "0.2.0").unwrap(); assert_eq!( details.releases, vec![ @@ -523,7 +523,7 @@ mod tests { env.fake_release().name("foo").version("0.0.2").create()?; for version in &["0.0.1", "0.0.2", "0.0.3"] { - let details = CrateDetails::new(&db.conn(), "foo", version).unwrap(); + let details = CrateDetails::new(&mut db.conn(), "foo", version).unwrap(); assert_eq!(details.latest_release().version, "0.0.3"); } @@ -545,7 +545,7 @@ mod tests { env.fake_release().name("foo").version("0.0.2").create()?; for version in &["0.0.1", "0.0.2", "0.0.3"] { - let details = CrateDetails::new(&db.conn(), "foo", version).unwrap(); + let details = CrateDetails::new(&mut db.conn(), "foo", version).unwrap(); assert_eq!(details.latest_release().version, "0.0.2"); } @@ -575,7 +575,7 @@ mod tests { .create()?; for version in &["0.0.1", "0.0.2", "0.0.3"] { - let details = CrateDetails::new(&db.conn(), "foo", version).unwrap(); + let details = CrateDetails::new(&mut db.conn(), "foo", version).unwrap(); assert_eq!(details.latest_release().version, "0.0.3"); } @@ -628,7 +628,7 @@ mod tests { }) .create()?; - let details = CrateDetails::new(&db.conn(), "foo", "0.0.1").unwrap(); + let details = CrateDetails::new(&mut db.conn(), "foo", "0.0.1").unwrap(); assert_eq!( details.owners, vec![("foobar".into(), "https://example.org/foobar".into())] @@ -652,7 +652,7 @@ mod tests { }) .create()?; - let details = CrateDetails::new(&db.conn(), "foo", "0.0.1").unwrap(); + let details = CrateDetails::new(&mut db.conn(), "foo", "0.0.1").unwrap(); let mut owners = details.owners.clone(); owners.sort(); assert_eq!( @@ -675,7 +675,7 @@ mod tests { }) .create()?; - let details = CrateDetails::new(&db.conn(), "foo", "0.0.1").unwrap(); + let details = CrateDetails::new(&mut db.conn(), "foo", "0.0.1").unwrap(); assert_eq!( details.owners, vec![("barfoo".into(), "https://example.org/barfoo".into())] @@ -693,7 +693,7 @@ mod tests { }) .create()?; - let details = CrateDetails::new(&db.conn(), "foo", "0.0.1").unwrap(); + let details = CrateDetails::new(&mut db.conn(), "foo", "0.0.1").unwrap(); assert_eq!( details.owners, vec![("barfoo".into(), "https://example.org/barfoov2".into())] diff --git a/src/web/error.rs b/src/web/error.rs index 0abcc3e92..1463a69ff 100644 --- a/src/web/error.rs +++ b/src/web/error.rs @@ -3,8 +3,7 @@ use crate::{ web::{page::WebPage, releases::Search, ErrorPage}, }; use failure::Fail; -use iron::{status::Status, Handler, IronError, IronResult, Plugin, Request, Response}; -use params::{Params, Value}; +use iron::{status::Status, Handler, IronError, IronResult, Request, Response}; use std::{error::Error, fmt}; #[derive(Debug, Copy, Clone)] @@ -54,13 +53,13 @@ impl Handler for Nope { } Nope::NoResults => { - let params = req.get::().unwrap(); + let mut params = req.url.as_ref().query_pairs(); - if let Some(Value::String(ref query)) = params.find(&["query"]) { + if let Some((_, query)) = params.find(|(key, _)| key == "query") { // this used to be a search Search { title: format!("No crates found matching '{}'", query), - search_query: Some(query.to_owned()), + search_query: Some(query.into_owned()), status: Status::NotFound, ..Default::default() } diff --git a/src/web/mod.rs b/src/web/mod.rs index 53bca3942..51b3d0eb7 100644 --- a/src/web/mod.rs +++ b/src/web/mod.rs @@ -90,7 +90,7 @@ use iron::{ Chain, Handler, Iron, IronError, IronResult, Listening, Request, Response, Url, }; use page::TemplateData; -use postgres::Connection; +use postgres::Client; use router::NoRoute; use semver::{Version, VersionReq}; use serde::Serialize; @@ -284,7 +284,7 @@ impl MatchSemver { /// This function will also check for crates where dashes in the name (`-`) have been replaced with /// underscores (`_`) and vice-versa. The return value will indicate whether the crate name has /// been matched exactly, or if there has been a "correction" in the name that matched instead. -fn match_version(conn: &Connection, name: &str, version: Option<&str>) -> Option { +fn match_version(conn: &mut Client, name: &str, version: Option<&str>) -> Option { // version is an Option<&str> from router::Router::get, need to decode first use iron::url::percent_encoding::percent_decode; @@ -369,17 +369,18 @@ fn match_version(conn: &Connection, name: &str, version: Option<&str>) -> Option /// Wrapper around the Markdown parser and renderer to render markdown fn render_markdown(text: &str) -> String { - use comrak::{markdown_to_html, ComrakOptions}; - - let options = { - let mut options = ComrakOptions::default(); - options.safe = true; - options.ext_superscript = true; - options.ext_table = true; - options.ext_autolink = true; - options.ext_tasklist = true; - options.ext_strikethrough = true; - options + use comrak::{markdown_to_html, ComrakExtensionOptions, ComrakOptions}; + + let options = ComrakOptions { + extension: ComrakExtensionOptions { + superscript: true, + table: true, + autolink: true, + tasklist: true, + strikethrough: true, + ..ComrakExtensionOptions::default() + }, + ..ComrakOptions::default() }; markdown_to_html(text, &options) @@ -399,7 +400,7 @@ impl Server { storage: Arc, ) -> Result { // Initialize templates - let template_data = Arc::new(TemplateData::new(&*db.get()?)?); + let template_data = Arc::new(TemplateData::new(&mut *db.get()?)?); if reload_templates { TemplateData::start_template_reloading(template_data.clone(), db.clone()); } @@ -589,7 +590,7 @@ pub(crate) struct MetaData { } impl MetaData { - fn from_crate(conn: &Connection, name: &str, version: &str) -> Option { + fn from_crate(conn: &mut Client, name: &str, version: &str) -> Option { let rows = conn .query( "SELECT crates.name, @@ -649,7 +650,7 @@ mod test { } fn version(v: Option<&str>, db: &TestDatabase) -> Option { - match_version(&db.conn(), "foo", v) + match_version(&mut db.conn(), "foo", v) .and_then(|version| version.assume_exact().map(|semver| semver.into_parts().0)) } diff --git a/src/web/page/templates.rs b/src/web/page/templates.rs index 8d02af143..eec8ce56c 100644 --- a/src/web/page/templates.rs +++ b/src/web/page/templates.rs @@ -4,7 +4,7 @@ use chrono::{DateTime, Utc}; use failure::ResultExt; use notify::{watcher, RecursiveMode, Watcher}; use path_slash::PathExt; -use postgres::Connection; +use postgres::Client; use serde_json::Value; use std::{ collections::HashMap, @@ -27,7 +27,7 @@ pub(crate) struct TemplateData { } impl TemplateData { - pub(crate) fn new(conn: &Connection) -> Result { + pub(crate) fn new(conn: &mut Client) -> Result { log::trace!("Loading templates"); let data = Self { @@ -50,10 +50,10 @@ impl TemplateData { thread::spawn(move || { fn reload(template_data: &TemplateData, pool: &Pool) -> Result<()> { - let conn = pool.get()?; + let mut conn = pool.get()?; template_data .templates - .swap(Arc::new(load_templates(&conn)?)); + .swap(Arc::new(load_templates(&mut conn)?)); log::info!("Reloaded templates"); Ok(()) @@ -72,7 +72,7 @@ impl TemplateData { } } -fn load_rustc_resource_suffix(conn: &Connection) -> Result { +fn load_rustc_resource_suffix(conn: &mut Client) -> Result { let res = conn.query( "SELECT value FROM config WHERE name = 'rustc_version';", &[], @@ -82,7 +82,7 @@ fn load_rustc_resource_suffix(conn: &Connection) -> Result { failure::bail!("missing rustc version"); } - if let Some(Ok(vers)) = res.get(0).get_opt::<_, Value>("value") { + if let Ok(vers) = res[0].try_get::<_, Value>("value") { if let Some(vers_str) = vers.as_str() { return Ok(crate::utils::parse_rustc_version(vers_str)?); } @@ -91,7 +91,7 @@ fn load_rustc_resource_suffix(conn: &Connection) -> Result { failure::bail!("failed to parse the rustc version"); } -pub(super) fn load_templates(conn: &Connection) -> Result { +pub(super) fn load_templates(conn: &mut Client) -> Result { // This uses a custom function to find the templates in the filesystem instead of Tera's // builtin way (passing a glob expression to Tera::new), speeding up the startup of the // application and running the tests. @@ -258,7 +258,7 @@ mod tests { crate::test::wrapper(|env| { let db = env.db(); - let tera = load_templates(&db.conn()).unwrap(); + let tera = load_templates(&mut db.conn()).unwrap(); tera.check_macro_files().unwrap(); Ok(()) diff --git a/src/web/releases.rs b/src/web/releases.rs index 34d6ff080..4f8e015fb 100644 --- a/src/web/releases.rs +++ b/src/web/releases.rs @@ -12,9 +12,9 @@ use iron::{ headers::{ContentType, Expires, HttpDate}, mime::{Mime, SubLevel, TopLevel}, modifiers::Redirect, - status, IronError, IronResult, Plugin, Request, Response, Url, + status, IronError, IronResult, Request, Response, Url, }; -use postgres::Connection; +use postgres::Client; use router::Router; use serde::Serialize; use serde_json::Value; @@ -65,7 +65,7 @@ impl Default for Order { } } -pub(crate) fn get_releases(conn: &Connection, page: i64, limit: i64, order: Order) -> Vec { +pub(crate) fn get_releases(conn: &mut Client, page: i64, limit: i64, order: Order) -> Vec { let offset = (page - 1) * limit; // WARNING: it is _crucial_ that this always be hard-coded and NEVER be user input @@ -91,7 +91,7 @@ pub(crate) fn get_releases(conn: &Connection, page: i64, limit: i64, order: Orde ordering, ); - conn.query(&query, &[&limit, &offset, &filter_failed]) + conn.query(query.as_str(), &[&limit, &offset, &filter_failed]) .unwrap() .into_iter() .map(|row| Release { @@ -107,7 +107,7 @@ pub(crate) fn get_releases(conn: &Connection, page: i64, limit: i64, order: Orde } fn get_releases_by_author( - conn: &Connection, + conn: &mut Client, page: i64, limit: i64, author: &str, @@ -130,7 +130,7 @@ fn get_releases_by_author( WHERE authors.slug = $1 ORDER BY crates.github_stars DESC LIMIT $2 OFFSET $3"; - let query = conn.query(&query, &[&author, &limit, &offset]).unwrap(); + let query = conn.query(query, &[&author, &limit, &offset]).unwrap(); let mut author_name = None; let packages = query @@ -156,7 +156,7 @@ fn get_releases_by_author( } fn get_releases_by_owner( - conn: &Connection, + conn: &mut Client, page: i64, limit: i64, author: &str, @@ -179,7 +179,7 @@ fn get_releases_by_owner( WHERE owners.login = $1 ORDER BY crates.github_stars DESC LIMIT $2 OFFSET $3"; - let query = conn.query(&query, &[&author, &limit, &offset]).unwrap(); + let query = conn.query(query, &[&author, &limit, &offset]).unwrap(); let mut author_name = None; let packages = query @@ -221,7 +221,7 @@ fn get_releases_by_owner( /// Returns 0 and an empty Vec when no results are found or if a database error occurs /// fn get_search_results( - conn: &Connection, + conn: &mut Client, mut query: &str, page: i64, limit: i64, @@ -301,8 +301,8 @@ impl_webpage! { } pub fn home_page(req: &mut Request) -> IronResult { - let conn = extension!(req, Pool).get()?; - let recent_releases = get_releases(&conn, 1, RELEASES_IN_HOME, Order::ReleaseTime); + let mut conn = extension!(req, Pool).get()?; + let recent_releases = get_releases(&mut conn, 1, RELEASES_IN_HOME, Order::ReleaseTime); HomePage { recent_releases }.into_response(req) } @@ -318,8 +318,8 @@ impl_webpage! { } pub fn releases_feed_handler(req: &mut Request) -> IronResult { - let conn = extension!(req, Pool).get()?; - let recent_releases = get_releases(&conn, 1, RELEASES_IN_FEED, Order::ReleaseTime); + let mut conn = extension!(req, Pool).get()?; + let recent_releases = get_releases(&mut conn, 1, RELEASES_IN_FEED, Order::ReleaseTime); ReleaseFeed { recent_releases }.into_response(req) } @@ -371,8 +371,8 @@ fn releases_handler(req: &mut Request, release_type: ReleaseType) -> IronResult< }; let releases = { - let conn = extension!(req, Pool).get()?; - get_releases(&conn, page_number, RELEASES_IN_RELEASES, release_order) + let mut conn = extension!(req, Pool).get()?; + get_releases(&mut conn, page_number, RELEASES_IN_RELEASES, release_order) }; // Show next and previous page buttons @@ -422,20 +422,20 @@ pub fn author_handler(req: &mut Request) -> IronResult { .ok_or_else(|| IronError::new(Nope::CrateNotFound, status::NotFound))?; let (author_name, releases) = { - let conn = extension!(req, Pool).get()?; + let mut conn = extension!(req, Pool).get()?; if author.starts_with('@') { let mut author = author.split('@'); get_releases_by_owner( - &conn, + &mut conn, page_number, RELEASES_IN_RELEASES, // TODO: Is this fallible? cexpect!(req, author.nth(1)), ) } else { - get_releases_by_author(&conn, page_number, RELEASES_IN_RELEASES, author) + get_releases_by_author(&mut conn, page_number, RELEASES_IN_RELEASES, author) } }; @@ -498,17 +498,20 @@ impl_webpage! { } pub fn search_handler(req: &mut Request) -> IronResult { - use params::{Params, Value}; + let url = req.url.as_ref(); + let mut params = url.query_pairs(); + let query = params.find(|(key, _)| key == "query"); + let mut conn = extension!(req, Pool).get()?; - let params = ctry!(req, req.get::()); - let query = params.find(&["query"]); - let conn = extension!(req, Pool).get()?; - - if let Some(Value::String(query)) = query { + if let Some((_, query)) = query { // check if I am feeling lucky button pressed and redirect user to crate page // if there is a match // TODO: Redirecting to latest doc might be more useful - if params.find(&["i-am-feeling-lucky"]).is_some() { + // NOTE: calls `query_pairs()` again because iterators are lazy and only yield items once + if url + .query_pairs() + .any(|(key, _)| key == "i-am-feeling-lucky") + { // redirect to a random crate if query is empty if query.is_empty() { // FIXME: This is a fast query but using a constant @@ -553,7 +556,7 @@ pub fn search_handler(req: &mut Request) -> IronResult { // since we never pass a version into `match_version` here, we'll never get // `MatchVersion::Exact`, so the distinction between `Exact` and `Semver` doesn't // matter - if let Some(matchver) = match_version(&conn, &query, None) { + if let Some(matchver) = match_version(&mut conn, &query, None) { let (version, id) = matchver.version.into_parts(); let query = matchver.corrected_name.unwrap_or_else(|| query.to_string()); @@ -601,7 +604,7 @@ pub fn search_handler(req: &mut Request) -> IronResult { } } - let (_, results) = get_search_results(&conn, &query, 1, RELEASES_IN_RELEASES); + let (_, results) = get_search_results(&mut conn, &query, 1, RELEASES_IN_RELEASES); let title = if results.is_empty() { format!("No results found for '{}'", query) } else { @@ -612,7 +615,7 @@ pub fn search_handler(req: &mut Request) -> IronResult { Search { title, results, - search_query: Some(query.to_owned()), + search_query: Some(query.into_owned()), ..Default::default() } .into_response(req) @@ -632,7 +635,7 @@ impl_webpage! { } pub fn activity_handler(req: &mut Request) -> IronResult { - let conn = extension!(req, Pool).get()?; + let mut conn = extension!(req, Pool).get()?; let activity_data: Value = ctry!( req, conn.query( @@ -714,7 +717,7 @@ mod tests { .version("0.0.0") .create()?; - let (num_results, results) = get_search_results(&db.conn(), "foo", 1, 100); + let (num_results, results) = get_search_results(&mut db.conn(), "foo", 1, 100); assert_eq!(num_results, 4); let mut results = results.into_iter(); @@ -743,7 +746,7 @@ mod tests { for name in near_matches.iter() { let (num_results, mut results) = - dbg!(get_search_results(&db.conn(), *name, 1, 100)); + dbg!(get_search_results(&mut db.conn(), *name, 1, 100)); assert_eq!(num_results, 3); for name in releases.iter() { @@ -766,7 +769,7 @@ mod tests { .build_result_successful(false) .create()?; - let (num_results, results) = get_search_results(&db.conn(), "regex", 1, 100); + let (num_results, results) = get_search_results(&mut db.conn(), "regex", 1, 100); assert_eq!(num_results, 0); let results = results.into_iter(); @@ -786,7 +789,7 @@ mod tests { .yanked(true) .create()?; - let (num_results, results) = get_search_results(&db.conn(), "regex", 1, 100); + let (num_results, results) = get_search_results(&mut db.conn(), "regex", 1, 100); assert_eq!(num_results, 0); let results = results.into_iter(); @@ -802,7 +805,7 @@ mod tests { let db = env.db(); env.fake_release().name("regex").version("0.0.0").create()?; - let (num_results, results) = get_search_results(&db.conn(), "redex", 1, 100); + let (num_results, results) = get_search_results(&mut db.conn(), "redex", 1, 100); assert_eq!(num_results, 1); let mut results = results.into_iter(); @@ -824,7 +827,7 @@ mod tests { // .create()?; // // let (num_results, results) = - // get_search_results(&db.conn(), "supercalifragilisticexpialidocious", 1, 100); + // get_search_results(&mut db.conn(), "supercalifragilisticexpialidocious", 1, 100); // assert_eq!(num_results, 1); // // let mut results = results.into_iter(); @@ -850,7 +853,7 @@ mod tests { .name("something_completely_unrelated") .create()?; - let (num_results, results) = get_search_results(&db.conn(), "something", 1, 2); + let (num_results, results) = get_search_results(&mut db.conn(), "something", 1, 2); assert_eq!(num_results, 4); let mut results = results.into_iter(); @@ -873,7 +876,7 @@ mod tests { .name("something_completely_unrelated") .create()?; - let (num_results, results) = get_search_results(&db.conn(), "something", 2, 2); + let (num_results, results) = get_search_results(&mut db.conn(), "something", 2, 2); assert_eq!(num_results, 4); let mut results = results.into_iter(); @@ -917,7 +920,7 @@ mod tests { .version("0.0.0") .create()?; - let (num_results, results) = get_search_results(&db.conn(), "somethang", 1, 100); + let (num_results, results) = get_search_results(&mut db.conn(), "somethang", 1, 100); assert_eq!(num_results, 1); let mut results = results.into_iter(); @@ -949,7 +952,7 @@ mod tests { // .create()?; // // let (num_results, results) = - // get_search_results(&db.conn(), "name_better_than_description", 1, 100); + // get_search_results(&mut db.conn(), "name_better_than_description", 1, 100); // assert_eq!(num_results, 2); // // let mut results = results.into_iter(); @@ -982,7 +985,7 @@ mod tests { .name("i_am_useless_and_mean_nothing") .create()?; - let (num_results, results) = get_search_results(&db.conn(), "match", 1, 100); + let (num_results, results) = get_search_results(&mut db.conn(), "match", 1, 100); assert_eq!(num_results, 3); let mut results = results.into_iter(); @@ -1003,7 +1006,7 @@ mod tests { env.fake_release().name("matcb").downloads(10).create()?; env.fake_release().name("matcc").downloads(1).create()?; - let (num_results, results) = get_search_results(&db.conn(), "match", 1, 100); + let (num_results, results) = get_search_results(&mut db.conn(), "match", 1, 100); assert_eq!(num_results, 3); let mut results = results.into_iter(); diff --git a/src/web/rustdoc.rs b/src/web/rustdoc.rs index f4c3f2ae0..99d8091ce 100644 --- a/src/web/rustdoc.rs +++ b/src/web/rustdoc.rs @@ -12,7 +12,7 @@ use crate::{ use iron::{ headers::{CacheControl, CacheDirective, Expires, HttpDate}, modifiers::Redirect, - status, Handler, IronError, IronResult, Plugin, Request, Response, Url, + status, Handler, IronError, IronResult, Request, Response, Url, }; use router::Router; use serde::Serialize; @@ -128,7 +128,7 @@ pub fn rustdoc_redirector_handler(req: &mut Request) -> IronResult { } let router = extension!(req, Router); - let conn = extension!(req, Pool).get()?; + let mut conn = extension!(req, Pool).get()?; // this handler should never called without crate pattern let crate_name = cexpect!(req, router.find("crate")); @@ -141,7 +141,7 @@ pub fn rustdoc_redirector_handler(req: &mut Request) -> IronResult { // it doesn't matter if the version that was given was exact or not, since we're redirecting // anyway - let (version, id) = match match_version(&conn, &crate_name, req_version) { + let (version, id) = match match_version(&mut conn, &crate_name, req_version) { Some(v) => { if let Some(new_name) = v.corrected_name { // `match_version` checked against -/_ typos, so if we have a name here we should @@ -168,7 +168,7 @@ pub fn rustdoc_redirector_handler(req: &mut Request) -> IronResult { ), ); - (rows.get(0).get(0), rows.get(0).get(1)) + (rows[0].get(0), rows[0].get(1)) }; if target == Some("index.html") || target == Some(&target_name) { @@ -216,7 +216,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult { ); let pool = extension!(req, Pool); - let conn = pool.get()?; + let mut conn = pool.get()?; let config = extension!(req, Config); let storage = extension!(req, Storage); let mut req_path = req.url.path(); @@ -246,7 +246,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult { // * If there is an exact match, but the requested crate name was corrected (dashes vs. underscores), redirect to the corrected name. // * If there is a semver (but not exact) match, redirect to the exact version. // * Otherwise, return a 404. - let version = if let Some(match_vers) = match_version(&conn, &name, url_version) { + let version = if let Some(match_vers) = match_version(&mut conn, &name, url_version) { match match_vers.version { MatchSemver::Exact((version, _)) => { // Redirect when the requested crate name isn't correct @@ -274,7 +274,7 @@ pub fn rustdoc_html_server_handler(req: &mut Request) -> IronResult { // Get the crate's details from the database // NOTE: we know this crate must exist because we just checked it above (or else `match_version` is buggy) - let krate = cexpect!(req, CrateDetails::new(&conn, &name, &version)); + let krate = cexpect!(req, CrateDetails::new(&mut conn, &name, &version)); // if visiting the full path to the default target, remove the target from the path // expects a req_path that looks like `[/:target]/.*` @@ -445,12 +445,12 @@ pub fn target_redirect_handler(req: &mut Request) -> IronResult { let version = cexpect!(req, router.find("version")); let pool = extension!(req, Pool); - let conn = pool.get()?; + let mut conn = pool.get()?; let storage = extension!(req, Storage); let config = extension!(req, Config); let base = redirect_base(req); - let crate_details = match CrateDetails::new(&conn, &name, &version) { + let crate_details = match CrateDetails::new(&mut conn, &name, &version) { Some(krate) => krate, None => return Err(IronError::new(Nope::ResourceNotFound, status::NotFound)), }; @@ -491,61 +491,60 @@ pub fn target_redirect_handler(req: &mut Request) -> IronResult { pub fn badge_handler(req: &mut Request) -> IronResult { use badge::{Badge, BadgeOptions}; use iron::headers::ContentType; - use params::{Params, Value}; - let version = { - let params = ctry!(req, req.get_ref::()); - match params.find(&["version"]) { - Some(&Value::String(ref version)) => version.clone(), - _ => "*".to_owned(), + let mut params = req.url.as_ref().query_pairs(); + match params.find(|(key, _)| key == "version") { + Some((_, version)) => version.into_owned(), + None => "*".to_owned(), } }; let name = cexpect!(req, extension!(req, Router).find("crate")); - let conn = extension!(req, Pool).get()?; - - let options = match match_version(&conn, &name, Some(&version)).and_then(|m| m.assume_exact()) { - Some(MatchSemver::Exact((version, id))) => { - let rows = ctry!( - req, - conn.query( - "SELECT rustdoc_status + let mut conn = extension!(req, Pool).get()?; + + let options = + match match_version(&mut conn, &name, Some(&version)).and_then(|m| m.assume_exact()) { + Some(MatchSemver::Exact((version, id))) => { + let rows = ctry!( + req, + conn.query( + "SELECT rustdoc_status FROM releases WHERE releases.id = $1", - &[&id] - ), - ); - if !rows.is_empty() && rows.get(0).get(0) { - BadgeOptions { - subject: "docs".to_owned(), - status: version, - color: "#4d76ae".to_owned(), - } - } else { - BadgeOptions { - subject: "docs".to_owned(), - status: version, - color: "#e05d44".to_owned(), + &[&id] + ), + ); + if !rows.is_empty() && rows[0].get(0) { + BadgeOptions { + subject: "docs".to_owned(), + status: version, + color: "#4d76ae".to_owned(), + } + } else { + BadgeOptions { + subject: "docs".to_owned(), + status: version, + color: "#e05d44".to_owned(), + } } } - } - Some(MatchSemver::Semver((version, _))) => { - let base_url = format!("{}/{}/badge.svg", redirect_base(req), name); - let url = ctry!( - req, - iron::url::Url::parse_with_params(&base_url, &[("version", version)]), - ); - let iron_url = ctry!(req, Url::from_generic_url(url)); - return Ok(super::redirect(iron_url)); - } + Some(MatchSemver::Semver((version, _))) => { + let base_url = format!("{}/{}/badge.svg", redirect_base(req), name); + let url = ctry!( + req, + iron::url::Url::parse_with_params(&base_url, &[("version", version)]), + ); + let iron_url = ctry!(req, Url::from_generic_url(url)); + return Ok(super::redirect(iron_url)); + } - None => BadgeOptions { - subject: "docs".to_owned(), - status: "no builds".to_owned(), - color: "#e05d44".to_owned(), - }, - }; + None => BadgeOptions { + subject: "docs".to_owned(), + status: "no builds".to_owned(), + color: "#e05d44".to_owned(), + }, + }; let mut resp = Response::with((status::Ok, ctry!(req, Badge::new(options)).to_svg())); resp.headers diff --git a/src/web/sitemap.rs b/src/web/sitemap.rs index 6446e09d7..c1944554d 100644 --- a/src/web/sitemap.rs +++ b/src/web/sitemap.rs @@ -21,7 +21,7 @@ impl_webpage! { } pub fn sitemap_handler(req: &mut Request) -> IronResult { - let conn = extension!(req, Pool).get()?; + let mut conn = extension!(req, Pool).get()?; let query = conn .query( "SELECT DISTINCT ON (crates.name) @@ -66,14 +66,14 @@ struct About { impl_webpage!(About = "core/about.html"); pub fn about_handler(req: &mut Request) -> IronResult { - let conn = extension!(req, Pool).get()?; + let mut conn = extension!(req, Pool).get()?; let res = ctry!( req, conn.query("SELECT value FROM config WHERE name = 'rustc_version'", &[]), ); let rustc_version = res.iter().next().and_then(|row| { - if let Some(Ok(Value::String(version))) = row.get_opt(0) { + if let Ok(Some(Value::String(version))) = row.try_get(0) { Some(version) } else { None diff --git a/src/web/source.rs b/src/web/source.rs index 100d4b3d6..5294a4ab7 100644 --- a/src/web/source.rs +++ b/src/web/source.rs @@ -7,7 +7,7 @@ use crate::{ Config, Storage, }; use iron::{status::Status, IronError, IronResult, Request, Response}; -use postgres::Connection; +use postgres::Client; use router::Router; use serde::Serialize; use serde_json::Value; @@ -47,7 +47,7 @@ impl FileList { /// This function is only returning FileList for requested directory. If is empty, /// it will return list of files (and dirs) for root directory. req_path must be a /// directory or empty for root directory. - fn from_path(conn: &Connection, name: &str, version: &str, req_path: &str) -> Option { + fn from_path(conn: &mut Client, name: &str, version: &str, req_path: &str) -> Option { let rows = conn .query( "SELECT crates.name, @@ -68,7 +68,7 @@ impl FileList { return None; } - let files: Value = rows.get(0).get_opt(5).unwrap().ok()?; + let files: Value = rows[0].try_get(5).ok()?; let mut file_list = Vec::new(); if let Some(files) = files.as_array() { @@ -127,12 +127,12 @@ impl FileList { Some(FileList { metadata: MetaData { - name: rows.get(0).get(0), - version: rows.get(0).get(1), - description: rows.get(0).get(2), - target_name: rows.get(0).get(3), - rustdoc_status: rows.get(0).get(4), - default_target: rows.get(0).get(6), + name: rows[0].get(0), + version: rows[0].get(1), + description: rows[0].get(2), + target_name: rows[0].get(3), + rustdoc_status: rows[0].get(4), + default_target: rows[0].get(6), }, files: file_list, }) @@ -185,7 +185,7 @@ pub fn source_browser_handler(req: &mut Request) -> IronResult { }; let pool = extension!(req, Pool); - let conn = pool.get()?; + let mut conn = pool.get()?; let storage = extension!(req, Storage); let config = extension!(req, Config); @@ -213,7 +213,7 @@ pub fn source_browser_handler(req: &mut Request) -> IronResult { (None, false) }; - let file_list = FileList::from_path(&conn, &name, &version, &req_path) + let file_list = FileList::from_path(&mut conn, &name, &version, &req_path) .ok_or_else(|| IronError::new(Nope::NoResults, Status::NotFound))?; SourcePage {