From 53590a56c160c9adbbc5a9e680649615522efad4 Mon Sep 17 00:00:00 2001 From: Eli Snow Date: Tue, 27 Apr 2021 02:48:14 +0000 Subject: [PATCH] Update most dependencies to the latest version Fix some clippy lints. Update devcontainer to the latest version of Rust and configure it to use vscode as the editor for various git operations. --- .devcontainer/Dockerfile | 11 +- Cargo.lock | 683 ++++++++++++------------------- Cargo.toml | 10 +- lib/body_reader/Cargo.toml | 2 +- lib/channel/Cargo.toml | 2 +- lib/config/Cargo.toml | 2 +- lib/config/src/from_yaml.rs | 6 +- lib/config/src/lib.rs | 26 +- lib/config/src/select_parser.rs | 2 +- lib/config_wasm/src/lib.rs | 4 +- lib/for_each_parallel/Cargo.toml | 2 +- lib/for_each_parallel/src/lib.rs | 6 +- lib/test_common/Cargo.toml | 4 +- src/bin/pewpew.rs | 7 +- src/bin/test_server.rs | 2 +- src/lib.rs | 25 +- src/providers.rs | 16 +- src/request.rs | 22 +- src/request/body_handler.rs | 6 +- src/request/request_maker.rs | 2 +- src/request/response_handler.rs | 6 +- src/stats.rs | 8 +- src/util.rs | 4 +- tests/integration.rs | 2 +- 24 files changed, 363 insertions(+), 497 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index aefa2609..710b4271 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.51 +FROM rust:1.52 # versions (according to their git tag) of different tools to download # https://github.com/EmbarkStudios/cargo-deny/releases @@ -47,4 +47,11 @@ RUN mkdir .node \ -not -wholename '.node/lib*' -delete ENV PATH=$PATH:/home/$USER/.node/bin -ENV EDITOR=code \ No newline at end of file +# ENV GIT_EDITOR="code --wait" +# ENV GIT_EXTERNAL_DIFF='code --wait --diff $LOCAL $REMOTE' + +RUN git config --global core.editor "code --wait" \ + && git config --global diff.tool vscode \ + && git config --global difftool.vscode.cmd 'code --wait --diff $LOCAL $REMOTE' \ + && git config --global merge.tool vscode \ + && git config --global mergetool.vscode.cmd 'code --wait $MERGED' \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 90016d9c..61e88813 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,9 +2,9 @@ # It is not intended for manual editing. [[package]] name = "adler" -version = "0.2.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "adler32" @@ -14,9 +14,9 @@ checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" [[package]] name = "ahash" -version = "0.6.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "796540673305a66d127804eef19ad696f1f204b8c1025aaca4958c17eab32877" +checksum = "7f200cbb1e856866d9eade941cf3aa0c5d7dd36f74311c4273b494f4ef036957" dependencies = [ "getrandom", "once_cell", @@ -25,9 +25,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] @@ -53,7 +53,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -76,7 +76,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -99,9 +99,9 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bitvec" -version = "0.19.4" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7ba35e9565969edb811639dbebfe34edc0368e472c5018474c8eb2543397f81" +checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" dependencies = [ "funty", "radium", @@ -136,7 +136,7 @@ version = "0.0.0" dependencies = [ "brotli", "brotli-decompressor", - "bytes 0.5.6", + "bytes", "libflate", ] @@ -163,9 +163,9 @@ dependencies = [ [[package]] name = "bstr" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "473fc6b38233f9af7baa94fb5852dca389e3d95b8e21c8e3719301462c5d9faf" +checksum = "90682c8d613ad3373e66de8c6411e0ae2ab2571e879d2efbf73558cc66f21279" dependencies = [ "lazy_static", "memchr", @@ -175,9 +175,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.4.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" +checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" [[package]] name = "byte-tools" @@ -187,15 +187,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" - -[[package]] -name = "bytes" -version = "0.5.6" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" @@ -211,15 +205,9 @@ checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" [[package]] name = "cc" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" [[package]] name = "cfg-if" @@ -250,7 +238,7 @@ dependencies = [ "num-integer", "num-traits", "time", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -337,35 +325,35 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.1" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" +checksum = "4feb231f0d4d6af81aed15928e58ecf5816aa62a2393e2c82f46973e92a9a278" dependencies = [ "autocfg", - "cfg-if 1.0.0", + "cfg-if", "lazy_static", ] [[package]] name = "csv" -version = "1.1.5" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d58633299b24b515ac72a3f869f8b91306a3cec616a602843a383acd6f9e97" +checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1" dependencies = [ "bstr", "csv-core", @@ -385,12 +373,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.1.7" +version = "3.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b57a92e9749e10f25a171adcebfafe72991d45e7ec2dcb853e8f83d9dafaeb08" +checksum = "232295399409a8b7ae41276757b5a1cc21032848d42bff2352261f958b3ca29a" dependencies = [ "nix", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -399,7 +387,7 @@ version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "num_cpus", ] @@ -452,11 +440,11 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "flate2" -version = "1.0.19" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129" +checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crc32fast", "libc", "miniz_oxide", @@ -494,30 +482,14 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ "matches", "percent-encoding 2.1.0", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "funty" version = "1.1.0" @@ -526,9 +498,9 @@ checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" [[package]] name = "futures" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9052a1a50244d8d5aa9bf55cbc2fb6f357c86cc52e46c62ed390a7180cf150" +checksum = "0e7e43a803dae2fa37c1f6a8fe121e1f7bf9548b4dfc0522a42f34145dadfc27" dependencies = [ "futures-channel", "futures-core", @@ -541,9 +513,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" +checksum = "e682a68b29a882df0545c143dc3646daefe80ba479bcdede94d5a703de2871e2" dependencies = [ "futures-core", "futures-sink", @@ -551,15 +523,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" +checksum = "0402f765d8a89a26043b889b26ce3c4679d268fa6bb22cd7c6aad98340e179d1" [[package]] name = "futures-executor" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e59fdc009a4b3096bf94f740a0f2424c082521f20a9b08c5c07c48d90fd9b9" +checksum = "badaa6a909fac9e7236d0620a2f57f7664640c56575b71a7552fbd68deafab79" dependencies = [ "futures-core", "futures-task", @@ -568,16 +540,17 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28be053525281ad8259d47e4de5de657b25e7bac113458555bb4b70bc6870500" +checksum = "acc499defb3b348f8d8f3f66415835a9131856ff7714bf10dadfc4ec4bdb29a1" [[package]] name = "futures-macro" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c287d25add322d9f9abdcdc5927ca398917996600182178774032e9f8258fedd" +checksum = "a4c40298486cdf52cc00cd6d6987892ba502c7656a16a4192a9992b1ccedd121" dependencies = [ + "autocfg", "proc-macro-hack", "proc-macro2", "quote", @@ -586,18 +559,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" +checksum = "a57bead0ceff0d6dde8f465ecd96c9338121bb7717d3e7b108059531870c4282" [[package]] name = "futures-task" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" -dependencies = [ - "once_cell", -] +checksum = "8a16bef9fc1a4dddb5bee51c989e3fbba26569cbb0e31f5b303c184e3dd33dae" [[package]] name = "futures-timer" @@ -607,10 +577,11 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.12" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" +checksum = "feb5c238d27e2bf94ffdfd27b2c29e3df4a68c4193bb6427384259e2bf191967" dependencies = [ + "autocfg", "futures-channel", "futures-core", "futures-io", @@ -618,7 +589,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.4", + "pin-project-lite", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -640,7 +611,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi", @@ -649,11 +620,11 @@ dependencies = [ [[package]] name = "h2" -version = "0.2.7" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" +checksum = "825343c4eef0b63f541f8903f395dc5beb362a979b5799a84062527ef1e37726" dependencies = [ - "bytes 0.5.6", + "bytes", "fnv", "futures-core", "futures-sink", @@ -664,7 +635,6 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "tracing-futures", ] [[package]] @@ -684,9 +654,9 @@ dependencies = [ [[package]] name = "hdrhistogram" -version = "7.2.0" +version = "7.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af54a13c410de2b5e2d611475072834b86d7b2f835a2a8f7b1b1248d3e9bfbd8" +checksum = "faa51471caf8069812385974ce947bf4b71a806d7e5a0d1f710af57d6a9a45ad" dependencies = [ "base64", "byteorder", @@ -707,36 +677,37 @@ dependencies = [ [[package]] name = "http" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" +checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" dependencies = [ - "bytes 1.0.1", + "bytes", "fnv", "itoa", ] [[package]] name = "http-body" -version = "0.3.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" +checksum = "60daa14be0e0786db0f03a9e57cb404c9d756eed2b6c62b9ea98ec5743ec75a9" dependencies = [ - "bytes 0.5.6", + "bytes", "http", + "pin-project-lite", ] [[package]] name = "httparse" -version = "1.3.4" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" +checksum = "f3a87b616e37e93c22fb19bcd386f02f3af5ea98a25670ad0fce773de23c5e68" [[package]] name = "httpdate" -version = "0.3.2" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" +checksum = "05842d0d43232b23ccb7060ecb0f0626922c21f30012e97b767b30afd4a5d4b9" [[package]] name = "humantime" @@ -749,11 +720,11 @@ dependencies = [ [[package]] name = "hyper" -version = "0.13.10" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" +checksum = "1e5f105c494081baa3bf9e200b279e27ec1623895cd504c7dbef8d0b080fcf54" dependencies = [ - "bytes 0.5.6", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -763,7 +734,7 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project 1.0.4", + "pin-project", "socket2", "tokio", "tower-service", @@ -773,22 +744,22 @@ dependencies = [ [[package]] name = "hyper-tls" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 0.5.6", + "bytes", "hyper", "native-tls", "tokio", - "tokio-tls", + "tokio-native-tls", ] [[package]] name = "idna" -version = "0.2.0" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" dependencies = [ "matches", "unicode-bidi", @@ -797,9 +768,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.6.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" +checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" dependencies = [ "autocfg", "hashbrown", @@ -811,16 +782,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", + "cfg-if", ] [[package]] @@ -840,9 +802,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "js-sys" -version = "0.3.46" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d7383929f7c9c7c2d0fa596f325832df98c3704f2c60553080f7127a58175" +checksum = "83bdfbace3a0e81a4253f73b49e960b053e396a11012cbd49b9b74d6a2b67062" dependencies = [ "wasm-bindgen", ] @@ -860,16 +822,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -878,40 +830,42 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "lexical-core" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db65c6da02e61f55dae90a0ae427b2a5f6b3e8db09f58d10efab23af92592616" +checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" dependencies = [ "arrayvec", "bitflags", - "cfg-if 0.1.10", + "cfg-if", "ryu", "static_assertions", ] [[package]] name = "libc" -version = "0.2.82" +version = "0.2.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" +checksum = "18794a8ad5b29321f790b55d93dfba91e125cb1a9edbd4f8e3150acc771c1a5e" [[package]] name = "libflate" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389de7875e06476365974da3e7ff85d55f1972188ccd9f6020dd7c8156e17914" +checksum = "6d87eae36b3f680f7f01645121b782798b56ef33c53f83d1c66ba3a22b60bfe3" dependencies = [ "adler32", "crc32fast", "libflate_lz77", - "rle-decode-fast", ] [[package]] name = "libflate_lz77" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3286f09f7d4926fc486334f28d8d2e6ebe4f7f9994494b6dab27ddfad2c9b11b" +checksum = "39a734c0493409afcd49deee13c006a04e3586b9761a03543c6272c9c51f2f5a" +dependencies = [ + "rle-decode-fast", +] [[package]] name = "linked-hash-map" @@ -921,20 +875,20 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" [[package]] name = "lock_api" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" +checksum = "0382880606dff6d15c9476c416d18690b72742aa7b605bb6dd6ec9030fbf07eb" dependencies = [ "scopeguard", ] [[package]] name = "log" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf3805d4480bb5b86070dcfeb9e2cb2ebc148adb753c5cca5f884d1d65a42b2" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", ] [[package]] @@ -951,15 +905,15 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "memchr" -version = "2.3.4" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "b16bd47d9e329435e309c58469fe0791c2d0d1ba96ec0954152a5ae2b04387dc" [[package]] name = "miniz_oxide" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", "autocfg", @@ -967,66 +921,24 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.23" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956" dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", "libc", "log", - "miow 0.2.2", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio-named-pipes" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" -dependencies = [ - "log", - "mio", - "miow 0.3.6", - "winapi 0.3.9", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio", + "miow", + "ntapi", + "winapi", ] [[package]] name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "miow" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" dependencies = [ - "socket2", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1056,41 +968,40 @@ dependencies = [ "tempfile", ] -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "nix" -version = "0.18.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83450fe6a6142ddd95fb064b746083fc4ef1705fe81f64a64e1d4b39f54a1055" +checksum = "fa9b4819da1bc61c0ea48b63b7bc8604064dd43013e7cc325df098d49cd7c18a" dependencies = [ "bitflags", "cc", - "cfg-if 0.1.10", + "cfg-if", "libc", ] [[package]] name = "nom" -version = "6.0.1" +version = "6.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88034cfd6b4a0d54dd14f4a507eceee36c0b70e5a02236c4e4df571102be17f0" +checksum = "e7413f999671bd4745a7b624bd370a569fb6bc574b23c83a3c5ed2e453f3d5e2" dependencies = [ "bitvec", + "funty", "lexical-core", "memchr", "version_check", ] +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi", +] + [[package]] name = "num-integer" version = "0.1.44" @@ -1122,9 +1033,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.5.2" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" +checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" [[package]] name = "opaque-debug" @@ -1134,29 +1045,29 @@ checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" [[package]] name = "openssl" -version = "0.10.32" +version = "0.10.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" +checksum = "6d7830286ad6a3973c0f1d9b73738f69c76b739301d0229c4b96501695cbe4c8" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", - "lazy_static", "libc", + "once_cell", "openssl-sys", ] [[package]] name = "openssl-probe" -version = "0.1.2" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "openssl-sys" -version = "0.9.60" +version = "0.9.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" +checksum = "b6b0d6fb7d80f877617dfcb014e605e2b5ab2fb0afdf27935219bb6bd984cb98" dependencies = [ "autocfg", "cc", @@ -1178,16 +1089,16 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccb628cad4f84851442432c60ad8e1f607e29752d0bf072cbd0baf28aa34272" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", - "redox_syscall 0.1.57", + "redox_syscall", "smallvec", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1252,7 +1163,7 @@ dependencies = [ "atty", "base64", "body_reader", - "bytes 0.5.6", + "bytes", "channel", "chrono", "clap", @@ -1279,7 +1190,7 @@ dependencies = [ "tempfile", "test_common", "tokio", - "tokio-tls", + "tokio-stream", "url", "yansi", "zip_all", @@ -1287,38 +1198,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" -dependencies = [ - "pin-project-internal 0.4.27", -] - -[[package]] -name = "pin-project" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b70b68509f17aa2857863b6fa00bf21fc93674c7a8893de2f469f6aa7ca2f2" -dependencies = [ - "pin-project-internal 1.0.4", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.27" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" +checksum = "c7509cc106041c40a4518d2af7a61530e1eed0e6285296a3d8c5472806ccc4a4" dependencies = [ - "proc-macro2", - "quote", - "syn", + "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.4" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa25a6393f22ce819b0f50e0be89287292fda8d425be38ee0ca14c4931d9e71" +checksum = "48c950132583b500556b1efd71d45b319029f2b71518d979fcc208e16b42426f" dependencies = [ "proc-macro2", "quote", @@ -1327,15 +1218,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" - -[[package]] -name = "pin-project-lite" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" +checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" [[package]] name = "pin-utils" @@ -1369,9 +1254,9 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "a152013215dca273577e18d2bf00fa862b89b24169fb78c4c95aeb07992c9cec" dependencies = [ "unicode-xid", ] @@ -1384,9 +1269,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ "proc-macro2", ] @@ -1399,9 +1284,9 @@ checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" [[package]] name = "rand" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18519b42a40024d661e1714153e9ad0c3de27cd495760ceb09710920f1098b1e" +checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" dependencies = [ "libc", "rand_chacha", @@ -1439,29 +1324,22 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - -[[package]] -name = "redox_syscall" -version = "0.2.4" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ec8ca9416c5ea37062b502703cd7fcb207736bc294f6e0cf367ac6fc234570" +checksum = "742739e41cd49414de871ea5e549afb7e2a3ac77b589bcbebe8c82fab37147fc" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.4.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", ] [[package]] @@ -1475,9 +1353,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.22" +version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] name = "remove_dir_all" @@ -1485,7 +1363,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1507,7 +1385,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ "lazy_static", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1518,9 +1396,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" +checksum = "3670b1d2fdf6084d192bc71ead7aabe6c06aa2ea3fbd9cc3ac111fa5c2b1bd84" dependencies = [ "bitflags", "core-foundation", @@ -1531,9 +1409,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" +checksum = "3676258fd3cfe2c9a0ec99ce3038798d847ce3e4bb17746373eb9f0f1ac16339" dependencies = [ "core-foundation-sys", "libc", @@ -1548,9 +1426,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.120" +version = "1.0.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "166b2349061381baf54a58e4b13c89369feb0ef2eaa57198899e2312aac30aab" +checksum = "ec7505abeacaec74ae4778d9d9328fe5a5d04253220a85c4ee022239fc996d03" dependencies = [ "serde_derive", ] @@ -1569,9 +1447,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.120" +version = "1.0.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca2a8cb5805ce9e3b95435e3765b7b553cecc762d938d409434338386cb5775" +checksum = "963a7dbc9895aeac7ac90e74f34a5d5261828f79df35cbed41e10189d3804d43" dependencies = [ "proc-macro2", "quote", @@ -1580,9 +1458,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.61" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" dependencies = [ "indexmap", "itoa", @@ -1613,9 +1491,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" +checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" [[package]] name = "smallvec" @@ -1625,13 +1503,12 @@ checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] name = "socket2" -version = "0.3.19" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" +checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" dependencies = [ - "cfg-if 1.0.0", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1648,9 +1525,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "syn" -version = "1.0.58" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5" +checksum = "a1e8cdbefb79a9a5a65e0db8b47b723ee907b7c7f8496c76a1770b5c310bab82" dependencies = [ "proc-macro2", "quote", @@ -1659,9 +1536,9 @@ dependencies = [ [[package]] name = "tap" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36474e732d1affd3a6ed582781b3683df3d0563714c59c39591e8ff707cf078e" +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" @@ -1669,12 +1546,12 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "rand", - "redox_syscall 0.2.4", + "redox_syscall", "remove_dir_all", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1708,15 +1585,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "thread_local" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301bdd13d23c49672926be451130892d274d3ba0b410c18e00daa7990ff38d99" -dependencies = [ - "once_cell", -] - [[package]] name = "time" version = "0.1.43" @@ -1724,14 +1592,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] name = "tinyvec" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf8dbc19eb42fba10e8feaaec282fb50e2c14b2726d6301dbfeed0f73306a6f" +checksum = "5b5220f05bb7de7f3f53c7c065e1199b3172696fe2db9f9c4d8ad9b4ee74c342" dependencies = [ "tinyvec_macros", ] @@ -1744,33 +1612,29 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "0.2.24" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099837d3464c16a808060bb3f02263b412f6fafcb5d01c533d309985fbeebe48" +checksum = "bd3076b5c8cc18138b8f8814895c11eb4de37114a5d127bafdc5e55798ceef37" dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", + "autocfg", + "bytes", "libc", "memchr", "mio", - "mio-named-pipes", - "mio-uds", "num_cpus", - "pin-project-lite 0.1.11", + "once_cell", + "parking_lot", + "pin-project-lite", "signal-hook-registry", - "slab", "tokio-macros", - "winapi 0.3.9", + "winapi", ] [[package]] name = "tokio-macros" -version = "0.2.6" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" +checksum = "c49e3df43841dafb86046472506755d8501c5615673955f6aa17181125d13c37" dependencies = [ "proc-macro2", "quote", @@ -1778,66 +1642,67 @@ dependencies = [ ] [[package]] -name = "tokio-tls" -version = "0.3.1" +name = "tokio-native-tls" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ "native-tls", "tokio", ] +[[package]] +name = "tokio-stream" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8864d706fdb3cc0843a49647ac892720dac98a6eeb818b77190592cf4994066" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", + "tokio-util", +] + [[package]] name = "tokio-util" -version = "0.3.1" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +checksum = "1caa0b0c8d94a049db56b5acf8cba99dc0623aab1b26d5b5f5e2d945846b3592" dependencies = [ - "bytes 0.5.6", + "bytes", "futures-core", "futures-sink", "log", - "pin-project-lite 0.1.11", + "pin-project-lite", "tokio", ] [[package]] name = "tower-service" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" +checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" [[package]] name = "tracing" -version = "0.1.22" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" +checksum = "09adeb8c97449311ccd28a427f96fb563e7fd31aabf994189879d9da2394b89d" dependencies = [ - "cfg-if 1.0.0", - "log", - "pin-project-lite 0.2.4", + "cfg-if", + "pin-project-lite", "tracing-core", ] [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "a9ff14f98b1a4b289c6248a023c1c2fa1491062964e9fed67ab29c4e4da4a052" dependencies = [ "lazy_static", ] -[[package]] -name = "tracing-futures" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" -dependencies = [ - "pin-project 0.4.27", - "tracing", -] - [[package]] name = "try-lock" version = "0.2.3" @@ -1846,9 +1711,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "typenum" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" [[package]] name = "ucd-trie" @@ -1858,18 +1723,18 @@ checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" [[package]] name = "unicode-bidi" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" dependencies = [ "matches", ] [[package]] name = "unicode-normalization" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13e63ab62dbe32aeee58d1c5408d35c36c392bba5d9d3142287219721afe606" +checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" dependencies = [ "tinyvec", ] @@ -1888,15 +1753,15 @@ checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" [[package]] name = "unicode-xid" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] name = "url" -version = "2.2.0" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ "form_urlencoded", "idna", @@ -1906,9 +1771,9 @@ dependencies = [ [[package]] name = "vcpkg" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" +checksum = "cbdbff6266a24120518560b5dc983096efb98462e51d0d68169895b237be3e5d" [[package]] name = "vec_map" @@ -1918,9 +1783,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" [[package]] name = "want" @@ -1934,17 +1799,17 @@ dependencies = [ [[package]] name = "wasi" -version = "0.10.1+wasi-snapshot-preview1" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93c6c3420963c5c64bca373b25e77acb562081b9bb4dd5bb864187742186cea9" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.69" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd364751395ca0f68cafb17666eee36b63077fb5ecd972bbcd74c90c4bf736e" +checksum = "d54ee1d4ed486f78874278e63e4069fc1ab9f6a18ca492076ffb90c5eb2997fd" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "serde", "serde_json", "wasm-bindgen-macro", @@ -1952,9 +1817,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.69" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1114f89ab1f4106e5b55e688b828c0ab0ea593a1ea7c094b141b14cbaaec2d62" +checksum = "3b33f6a0694ccfea53d94db8b2ed1c3a8a4c86dd936b13b9f0a15ec4a451b900" dependencies = [ "bumpalo", "lazy_static", @@ -1967,9 +1832,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.69" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6ac8995ead1f084a8dea1e65f194d0973800c7f571f6edd70adf06ecf77084" +checksum = "088169ca61430fe1e58b8096c24975251700e7b1f6fd91cc9d59b04fb9b18bd4" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1977,9 +1842,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.69" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a48c72f299d80557c7c62e37e7225369ecc0c963964059509fbafe917c7549" +checksum = "be2241542ff3d9f241f5e2cb6dd09b37efe786df8851c54957683a49f0987a97" dependencies = [ "proc-macro2", "quote", @@ -1990,15 +1855,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7811dd7f9398f14cc76efd356f98f03aa30419dea46aa810d71e819fc97158" - -[[package]] -name = "winapi" -version = "0.2.8" +version = "0.2.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +checksum = "d7cff876b8f18eed75a66cf49b65e7f967cb354a7aa16003fb55dbfd25b44b4f" [[package]] name = "winapi" @@ -2010,12 +1869,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2028,7 +1881,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2037,16 +1890,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "wyz" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index 21e1a3f8..1c04341e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ path = "src/bin/test_server.rs" atty = "0.2" base64 = "0.13" body_reader = { path = "./lib/body_reader" } -bytes = "0.5" +bytes = "1" channel = { path = "./lib/channel" } clap = "2" config = { path = "./lib/config" } @@ -34,8 +34,8 @@ futures = "0.3" futures-timer = "3" hdrhistogram = "7" http = "0.2" -hyper = "0.13" -hyper-tls = "0.4" +hyper = { version = "0.14", features = ["client", "http1", "http2", "stream"] } +hyper-tls = "0.5" itertools = "0.10" mod_interval = { path = "./lib/mod_interval" } native-tls = "0.2" @@ -45,8 +45,8 @@ select_any = { path = "./lib/select_any" } serde = { version = "1.0", features = ["derive"] } serde_json = "1" test_common = { path = "./lib/test_common" } -tokio = "0.2" -tokio-tls = "0.3" +tokio = "1" +tokio-stream = { version = "0.1", features = ["sync", "time"] } url = "2" yansi = "0.5" zip_all = { path = "./lib/zip_all" } diff --git a/lib/body_reader/Cargo.toml b/lib/body_reader/Cargo.toml index b2202895..c91ada14 100644 --- a/lib/body_reader/Cargo.toml +++ b/lib/body_reader/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache 2.0" doctest = false [dependencies] -bytes = "0.5" +bytes = "1" brotli-decompressor = "2" libflate = "1" diff --git a/lib/channel/Cargo.toml b/lib/channel/Cargo.toml index 42d2743e..06c0c870 100644 --- a/lib/channel/Cargo.toml +++ b/lib/channel/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache 2.0" doctest = false [dependencies] -ahash = "0.6" +ahash = "0.7" concurrent-queue = "1" dashmap = "4" event-listener = "2" diff --git a/lib/config/Cargo.toml b/lib/config/Cargo.toml index 12384d15..67026f11 100644 --- a/lib/config/Cargo.toml +++ b/lib/config/Cargo.toml @@ -32,4 +32,4 @@ js-sys = "0.3" [dev-dependencies] maplit = "1" test_common = { path = "../test_common" } -tokio = "0.2" \ No newline at end of file +tokio = "1" \ No newline at end of file diff --git a/lib/config/src/from_yaml.rs b/lib/config/src/from_yaml.rs index 3c6168f7..860088a8 100644 --- a/lib/config/src/from_yaml.rs +++ b/lib/config/src/from_yaml.rs @@ -472,9 +472,9 @@ impl Default for Nullable { } } -impl Into> for Nullable { - fn into(self) -> Option { - match self { +impl From> for Option { + fn from(n: Nullable) -> Option { + match n { Nullable::Some(t) => Some(t), Nullable::Null => None, } diff --git a/lib/config/src/lib.rs b/lib/config/src/lib.rs index d88986ab..4eebe482 100644 --- a/lib/config/src/lib.rs +++ b/lib/config/src/lib.rs @@ -1,3 +1,5 @@ +// This is temporary until a new version of pest is released which no longer requires this +#![allow(legacy_derive_helpers, clippy::upper_case_acronyms)] mod error; mod expression_functions; mod from_yaml; @@ -27,7 +29,7 @@ use std::{ collections::{BTreeMap, BTreeSet}, iter, num::{NonZeroU16, NonZeroUsize}, - path::PathBuf, + path::{Path, PathBuf}, time::Duration, }; @@ -1555,9 +1557,9 @@ impl FromYaml for EndpointProvidesSendOptions { #[cfg_attr(debug_assertions, derive(Debug, PartialEq))] pub(crate) struct EndpointProvidesPreProcessed { - send: Option, - select: WithMarker, for_each: Vec>, + select: WithMarker, + send: Option, where_clause: Option>, } @@ -1620,9 +1622,9 @@ impl FromYaml for EndpointProvidesPreProcessed { let select = select.ok_or(Error::MissingYamlField("select", marker))?; let for_each = for_each.unwrap_or_default(); let ret = Self { - send, - select, for_each, + select, + send, where_clause, }; Ok((ret, marker)) @@ -1647,9 +1649,9 @@ pub fn default_auto_buffer_start_size() -> usize { #[cfg_attr(debug_assertions, derive(Debug, PartialEq))] struct ClientConfigPreProcessed { - request_timeout: PreDuration, headers: TupleVec, keepalive: PreDuration, + request_timeout: PreDuration, } impl FromYaml for ClientConfigPreProcessed { @@ -1707,9 +1709,9 @@ impl FromYaml for ClientConfigPreProcessed { let keepalive = keepalive.unwrap_or_else(|| default_keepalive(marker)); let headers = headers.unwrap_or_default(); let ret = Self { - request_timeout, - keepalive, headers, + keepalive, + request_timeout, }; Ok((ret, marker)) } @@ -2429,7 +2431,7 @@ impl Endpoint { static_vars: &BTreeMap, global_load_pattern: &Option, global_headers: &[(String, (Template, RequiredProviders))], - config_path: &PathBuf, + config_path: &Path, ) -> Result { let EndpointPreProcessed { declare, @@ -2523,7 +2525,7 @@ impl Endpoint { let value = match body { Body::File(body) => { let template = body.as_template(static_vars, &mut required_providers)?; - BodyTemplate::File(config_path.clone(), template) + BodyTemplate::File(config_path.into(), template) } Body::String(body) => { let template = body.as_template(static_vars, &mut required_providers)?; @@ -2567,7 +2569,7 @@ impl Endpoint { }) .collect::>()?; let multipart = MultipartBody { - path: config_path.clone(), + path: config_path.into(), pieces, }; BodyTemplate::Multipart(multipart) @@ -2654,7 +2656,7 @@ impl Endpoint { impl LoadTest { pub fn from_config( bytes: &[u8], - config_path: &PathBuf, + config_path: &Path, env_vars: &BTreeMap, ) -> Result { let iter = std::str::from_utf8(bytes).unwrap().chars(); diff --git a/lib/config/src/select_parser.rs b/lib/config/src/select_parser.rs index 130bfdfc..b607545b 100644 --- a/lib/config/src/select_parser.rs +++ b/lib/config/src/select_parser.rs @@ -1293,9 +1293,9 @@ impl Select { let where_clause = where_clause.map(|w| WithMarker::new(w.into(), marker)); let send = Some(send); let eppp = EndpointProvidesPreProcessed { + for_each, select, send, - for_each, where_clause, }; let mut rp_default = RequiredProviders::new(); diff --git a/lib/config_wasm/src/lib.rs b/lib/config_wasm/src/lib.rs index 26c5e138..bb7cc43d 100644 --- a/lib/config_wasm/src/lib.rs +++ b/lib/config_wasm/src/lib.rs @@ -2,6 +2,8 @@ use config::{LoadTest, Provider}; use js_sys::Map; use wasm_bindgen::{prelude::wasm_bindgen, JsValue}; +use std::path::PathBuf; + #[wasm_bindgen] pub struct Config(LoadTest); @@ -11,7 +13,7 @@ impl Config { #[wasm_bindgen(constructor)] pub fn from_bytes(bytes: &[u8], env_vars: Map) -> Result { let env_vars = serde_wasm_bindgen::from_value(env_vars.into())?; - let load_test = LoadTest::from_config(bytes, &Default::default(), &env_vars) + let load_test = LoadTest::from_config(bytes, &PathBuf::default(), &env_vars) .map_err(|e| JsValue::from_str(&format!("{:?}", e)))?; Ok(Config(load_test)) } diff --git a/lib/for_each_parallel/Cargo.toml b/lib/for_each_parallel/Cargo.toml index eb833bfd..fe426b3c 100644 --- a/lib/for_each_parallel/Cargo.toml +++ b/lib/for_each_parallel/Cargo.toml @@ -10,7 +10,7 @@ doctest = false [dependencies] futures = "0.3" -tokio = "0.2" +tokio = "1" [dev-dependencies] futures-timer = "3" \ No newline at end of file diff --git a/lib/for_each_parallel/src/lib.rs b/lib/for_each_parallel/src/lib.rs index d6190992..8d9554a0 100644 --- a/lib/for_each_parallel/src/lib.rs +++ b/lib/for_each_parallel/src/lib.rs @@ -153,7 +153,7 @@ mod tests { } }); let start = Instant::now(); - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(fep).unwrap(); let elapsed = start.elapsed(); // check that the function ran n times @@ -185,7 +185,7 @@ mod tests { } }); let start = Instant::now(); - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(fep).unwrap(); let elapsed = start.elapsed(); // check that the function ran n times @@ -218,7 +218,7 @@ mod tests { } }); // let start = Instant::now(); - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(fep).unwrap(); // let elapsed = start.elapsed(); // check that the function ran n times diff --git a/lib/test_common/Cargo.toml b/lib/test_common/Cargo.toml index 189269e9..6d619838 100644 --- a/lib/test_common/Cargo.toml +++ b/lib/test_common/Cargo.toml @@ -12,8 +12,8 @@ path = "test_common.rs" [dependencies] futures = "0.3" futures-timer = "3" -hyper = "0.13" +hyper = { version = "0.14", features = ["server"] } http = "0.2" parking_lot = "0.11" -tokio = { version = "0.2", features = ["full"] } +tokio = { version = "1", features = ["full"] } url = "2" \ No newline at end of file diff --git a/src/bin/pewpew.rs b/src/bin/pewpew.rs index 7c823dfc..b3e44bcc 100644 --- a/src/bin/pewpew.rs +++ b/src/bin/pewpew.rs @@ -257,11 +257,11 @@ fn main() { .unwrap_or_default(); let file = matches.value_of("file").map(Into::into); let try_config = TryConfig { - loggers_on, + config_file, file, filters, format, - config_file, + loggers_on, results_dir, }; ExecConfig::Try(try_config) @@ -271,8 +271,7 @@ fn main() { let f = create_run(cli_config, ctrlc_channel, io::stdout(), io::stderr()); - let mut rt = runtime::Builder::new() - .threaded_scheduler() + let rt = runtime::Builder::new_multi_thread() .enable_time() .enable_io() .thread_name("pewpew-worker") diff --git a/src/bin/test_server.rs b/src/bin/test_server.rs index 65702dbe..a1a98bda 100644 --- a/src/bin/test_server.rs +++ b/src/bin/test_server.rs @@ -2,7 +2,7 @@ use test_common::start_test_server; use tokio::runtime::Runtime; fn main() { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async { // todo!("get working"); let port = std::env::var("PORT").ok().and_then(|s| s.parse().ok()); diff --git a/src/lib.rs b/src/lib.rs index 0f7ef711..5d1cac11 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,6 +32,7 @@ use mod_interval::{ModInterval, PerX}; use native_tls::TlsConnector; use serde_json as json; use tokio::{sync::broadcast, task::spawn_blocking}; +use tokio_stream::wrappers::{BroadcastStream, IntervalStream}; use yansi::Paint; use std::{ @@ -43,7 +44,7 @@ use std::{ future::Future, io::{Error as IOError, ErrorKind as IOErrorKind, Read, Seek, SeekFrom, Write}, mem, - path::PathBuf, + path::{Path, PathBuf}, pin::Pin, sync::Arc, task::Poll, @@ -207,10 +208,10 @@ pub struct RunConfig { pub config_file: PathBuf, pub output_format: RunOutputFormat, pub results_dir: Option, + pub start_at: Option, pub stats_file: PathBuf, pub stats_file_format: StatsFileFormat, pub watch_config_file: bool, - pub start_at: Option, } #[derive(Clone)] @@ -222,10 +223,10 @@ pub enum TryFilter { #[derive(Clone)] pub struct TryConfig { pub config_file: PathBuf, - pub loggers_on: bool, pub file: Option, pub filters: Option>, pub format: TryRunFormat, + pub loggers_on: bool, pub results_dir: Option, } @@ -265,7 +266,7 @@ async fn _create_run( stdout: FCSender, stderr: FCSender, test_ended_tx: broadcast::Sender>, - mut test_ended_rx: broadcast::Receiver>, + mut test_ended_rx: BroadcastStream>, ) -> Result { let config_file = exec_config.get_config_file().clone(); let config_file2 = config_file.clone(); @@ -285,7 +286,7 @@ async fn _create_run( // watch for ctrl-c and kill the test let test_ended_tx2 = test_ended_tx.clone(); - let mut test_ended_rx2 = test_ended_tx.subscribe(); + let mut test_ended_rx2 = BroadcastStream::new(test_ended_tx.subscribe()); tokio::spawn(future::poll_fn(move |cx| { match ctrlc_channel.poll_next_unpin(cx) { Poll::Ready(r) => { @@ -388,6 +389,7 @@ where Se: Write + Send + 'static, { let (test_ended_tx, test_ended_rx) = broadcast::channel(1); + let test_ended_rx = BroadcastStream::new(test_ended_rx); let output_format = exec_config.get_output_format(); let (stdout, stdout_done) = blocking_writer(stdout, test_ended_tx.clone(), "stdout".into()); let (mut stderr, stderr_done) = blocking_writer(stderr, test_ended_tx.clone(), "stderr".into()); @@ -477,9 +479,9 @@ fn create_config_watcher( mut previous_providers: Arc>, ) { let start_time = Instant::now(); - let mut interval = tokio::time::interval(Duration::from_millis(1000)); + let mut interval = IntervalStream::new(tokio::time::interval(Duration::from_millis(1000))); let mut last_modified = None; - let mut test_end_rx = test_ended_tx.subscribe(); + let mut test_end_rx = BroadcastStream::new(test_ended_tx.subscribe()); let stream = stream::poll_fn(move |cx| match interval.poll_next_unpin(cx) { Poll::Ready(_) => Poll::Ready(Some(())), Poll::Pending => match test_end_rx.poll_next_unpin(cx) { @@ -765,7 +767,8 @@ fn create_try_run_future( let client = create_http_client(config_config.client.keepalive)?; // create the stats channel - let stats_tx = create_try_run_stats_channel(test_ended_tx.subscribe(), stderr); + let test_complete = BroadcastStream::new(test_ended_tx.subscribe()); + let stats_tx = create_try_run_stats_channel(test_complete, stderr); let mut builder_ctx = request::BuilderContext { config: config_config, @@ -778,7 +781,7 @@ fn create_try_run_future( let endpoint_calls = endpoints.build(filter_fn, &mut builder_ctx, &response_providers)?; - let mut test_ended_rx = test_ended_tx.subscribe(); + let mut test_ended_rx = BroadcastStream::new(test_ended_tx.subscribe()); let mut left = try_join_all(endpoint_calls).map(move |r| { let _ = test_ended_tx.send(r.map(|_| TestEndReason::Completed)); }); @@ -873,7 +876,7 @@ fn create_load_test_future( let _ = stats_tx.unbounded_send(StatsMessage::Start(duration)); let mut f = try_join_all(endpoint_calls); let mut test_timeout = Delay::new(duration); - let mut test_ended_rx = test_ended_tx.subscribe(); + let mut test_ended_rx = BroadcastStream::new(test_ended_tx.subscribe()); let f = future::poll_fn(move |cx| match f.poll_unpin(cx) { Poll::Ready(r) => { let _ = test_ended_tx.send(r.map(|_| TestEndReason::Completed)); @@ -914,7 +917,7 @@ fn get_providers_from_config( config_providers: &BTreeMap, auto_size: usize, test_ended_tx: &broadcast::Sender>, - config_path: &PathBuf, + config_path: &Path, ) -> ProvidersResult { let mut providers = BTreeMap::new(); let mut response_providers = BTreeSet::new(); diff --git a/src/providers.rs b/src/providers.rs index b204295c..d478538f 100644 --- a/src/providers.rs +++ b/src/providers.rs @@ -262,7 +262,7 @@ mod tests { #[test] fn range_provider_works() { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async move { let range_params = r#" start: 0 @@ -320,7 +320,7 @@ mod tests { #[test] fn literals_provider_works() { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async move { let jsons = vec![json!(1), json!(2), json!(3)]; let lwo = config::ListWithOptions { @@ -416,7 +416,7 @@ mod tests { let expect: Vec<_> = vec![json!(1), json!(2)]; // add a short delay to give the literals `prime_tx` enough time to complete - time::delay_for(Duration::from_millis(50)).await; + time::sleep(Duration::from_millis(50)).await; let values: Vec<_> = rx.collect().await; @@ -484,7 +484,7 @@ mod tests { #[test] fn basic_logger_works() { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async move { let logger_params = r#" to: "" @@ -526,7 +526,7 @@ mod tests { #[test] fn basic_logger_works_with_large_data() { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async move { let logger_params = r#" to: "" @@ -565,7 +565,7 @@ mod tests { #[test] fn basic_logger_works_with_would_block() { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async move { let logger_params = r#" to: "" @@ -607,7 +607,7 @@ mod tests { #[test] fn logger_limit_works() { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async move { let logger_params = r#" to: "" @@ -645,7 +645,7 @@ mod tests { #[test] fn logger_pretty_works() { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async move { let logger_params = r#" to: "" diff --git a/src/request.rs b/src/request.rs index 55da8673..454f8006 100644 --- a/src/request.rs +++ b/src/request.rs @@ -8,7 +8,7 @@ use self::request_maker::RequestMaker; use request_maker::ProviderDelays; -use bytes::{Bytes, BytesMut}; +use bytes::Bytes; use ether::{Either, Either3, EitherExt}; use for_each_parallel::ForEachParallel; use futures::{ @@ -26,7 +26,10 @@ use hyper_tls::HttpsConnector; use rand::distributions::{Alphanumeric, Distribution}; use select_any::select_any; use serde_json as json; -use tokio::{fs::File as TokioFile, io::AsyncRead}; +use tokio::{ + fs::File as TokioFile, + io::{AsyncRead, ReadBuf}, +}; use zip_all::zip_all; use crate::error::{RecoverableError, TestError}; @@ -517,12 +520,17 @@ async fn create_file_hyper_body(filename: String) -> Result<(u64, HyperBody), Te }; let stream = stream::poll_fn(move |cx| { - let mut buffer = BytesMut::with_capacity(8192); - match Pin::new(&mut file).poll_read_buf(cx, &mut buffer) { + let mut buffer = vec![0; 8192]; + let mut buf = ReadBuf::new(&mut buffer); + match Pin::new(&mut file).poll_read(cx, &mut buf) { Poll::Pending => Poll::Pending, Poll::Ready(Err(e)) => Poll::Ready(Some(Err(e))), - Poll::Ready(Ok(0)) => Poll::Ready(None), - Poll::Ready(Ok(_)) => Poll::Ready(Some(Ok(buffer))), + Poll::Ready(Ok(_)) if buf.filled().is_empty() => Poll::Ready(None), + Poll::Ready(Ok(_)) => { + let len = buf.filled().len(); + buffer.truncate(len); + Poll::Ready(Some(Ok(buffer))) + } } }); @@ -871,7 +879,7 @@ mod tests { .collect::>() .await }; - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); let streamed_bytes = rt.block_on(f); let file_bytes = include_bytes!("../tests/test.jpg").to_vec(); assert_eq!(file_bytes, streamed_bytes); diff --git a/src/request/body_handler.rs b/src/request/body_handler.rs index d35b7057..b6cc00a0 100644 --- a/src/request/body_handler.rs +++ b/src/request/body_handler.rs @@ -20,14 +20,14 @@ use std::{ use super::{BlockSender, Outgoing, ProviderDelays, ProviderOrLogger, StatsTx, TemplateValues}; pub(super) struct BodyHandler { - pub(super) now: Instant, - pub(super) provider_delays: ProviderDelays, - pub(super) template_values: TemplateValues, pub(super) included_outgoing_indexes: BTreeSet, + pub(super) now: Instant, pub(super) outgoing: Arc>, + pub(super) provider_delays: ProviderDelays, pub(super) stats_tx: StatsTx, pub(super) status: u16, pub(super) tags: Arc>, + pub(super) template_values: TemplateValues, } impl BodyHandler { diff --git a/src/request/request_maker.rs b/src/request/request_maker.rs index c16fbff2..f0f6929d 100644 --- a/src/request/request_maker.rs +++ b/src/request/request_maker.rs @@ -400,7 +400,7 @@ mod tests { #[test] fn sends_request() { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async move { let (port, ..) = test_common::start_test_server(None); let url = Template::simple(&format!("https://127.0.0.1:{}", port)); diff --git a/src/request/response_handler.rs b/src/request/response_handler.rs index 348f5dad..354c7f6b 100644 --- a/src/request/response_handler.rs +++ b/src/request/response_handler.rs @@ -126,14 +126,14 @@ impl ResponseHandler { body_future .then(move |body_value| { let bh = BodyHandler { - provider_delays, - now, - template_values, included_outgoing_indexes, + now, outgoing, + provider_delays, stats_tx, status, tags, + template_values, }; bh.handle(body_value, auto_returns) }) diff --git a/src/stats.rs b/src/stats.rs index a605642f..8420a412 100644 --- a/src/stats.rs +++ b/src/stats.rs @@ -20,6 +20,7 @@ use tokio::{ sync::broadcast, time::{self, Duration, Instant}, }; +use tokio_stream::wrappers::{BroadcastStream, IntervalStream}; use yansi::Paint; use std::{ @@ -673,7 +674,7 @@ fn duration_to_pretty_long_form(duration: Duration) -> String { // create the stats channel for a try run pub fn create_try_run_stats_channel( - mut test_complete: broadcast::Receiver>, + mut test_complete: BroadcastStream>, mut console: FCSender, ) -> futures_channel::UnboundedSender { let (tx, mut rx) = futures_channel::unbounded::(); @@ -754,7 +755,7 @@ pub fn create_stats_channel( Vec::new() }; - let mut test_complete = test_killer.subscribe(); + let mut test_complete = BroadcastStream::new(test_killer.subscribe()); let mut stats = Stats::new( &file_path, @@ -772,7 +773,8 @@ pub fn create_stats_channel( // create the task responsible for receiving incoming statistics let stats_receiver_task = async move { - let mut print_stats_interval = time::interval_at(now + next_bucket, bucket_size); + let mut print_stats_interval = + IntervalStream::new(time::interval_at(now + next_bucket, bucket_size)); // create a stream which combines getting incoming messages, printing stats on an interval // and checking if the test has ended enum StreamItem { diff --git a/src/util.rs b/src/util.rs index 995bb676..d8d5cc5a 100644 --- a/src/util.rs +++ b/src/util.rs @@ -1,6 +1,6 @@ use serde_json as json; -use std::{borrow::Cow, path::PathBuf}; +use std::{borrow::Cow, path::Path}; pub fn str_to_json(s: &str) -> json::Value { json::from_str(s).unwrap_or_else(|_| json::Value::String(s.into())) @@ -14,7 +14,7 @@ pub fn json_value_to_string(v: Cow<'_, json::Value>) -> Cow<'_, String> { } } -pub fn tweak_path(rest: &mut String, base: &PathBuf) { +pub fn tweak_path(rest: &mut String, base: &Path) { *rest = base.with_file_name(&rest).to_string_lossy().into(); } diff --git a/tests/integration.rs b/tests/integration.rs index fcef7474..6f07b6ae 100644 --- a/tests/integration.rs +++ b/tests/integration.rs @@ -5,7 +5,7 @@ use test_common::{start_test_server, TestWriter}; use tokio::runtime::Runtime; fn run_test(path: &str) -> (bool, String, String) { - let mut rt = Runtime::new().unwrap(); + let rt = Runtime::new().unwrap(); rt.block_on(async move { let (port, kill_server, _) = start_test_server(None); env::set_var("PORT", port.to_string());