diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8e0c07cf..88a6fd89 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -69,7 +69,7 @@ jobs: components: clippy, rustfmt override: true target: ${{ matrix.target }} - toolchain: 1.56.0 + toolchain: stable - name: Info run: | diff --git a/Cargo.lock b/Cargo.lock index c307b5cb..0569aa1c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,37 +4,49 @@ version = 3 [[package]] name = "addr2line" -version = "0.13.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6a2d3371669ab3ca9797670853d61402b03d0b4b9ebf33d677dfa720203072" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] [[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 = "aho-corasick" -version = "0.7.13" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] -name = "ansi_term" -version = "0.11.0" +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" dependencies = [ - "winapi", + "libc", ] +[[package]] +name = "anes" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" + [[package]] name = "ansi_term" version = "0.12.1" @@ -44,6 +56,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstyle" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" + [[package]] name = "array-init" version = "0.0.4" @@ -74,7 +92,7 @@ dependencies = [ "nom", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -93,7 +111,7 @@ dependencies = [ "humansize", "num-traits", "serde", - "toml", + "toml 0.5.11", ] [[package]] @@ -102,24 +120,25 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.51" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec1931848a574faa8f7c71a12ea00453ff5effbb5f51afe7f77d7a48cace6ac1" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", + "cc", "cfg-if", "libc", "miniz_oxide", @@ -127,11 +146,17 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base64" +version = "0.21.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" + [[package]] name = "bendy" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f35e865a4aae9618063f67b1cd1ff6d0ae28b9478f1cdc0dd88d61884c8fe71" +checksum = "8133e404c8bec821e531f347dab1247bf64f60882826e7228f8ffeb33a35a658" dependencies = [ "failure", "serde", @@ -140,91 +165,115 @@ dependencies = [ [[package]] name = "bitflags" -version = "1.2.1" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bstr" -version = "0.2.13" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931" +checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" dependencies = [ - "lazy_static", "memchr", - "regex-automata", "serde", ] [[package]] name = "bumpalo" -version = "3.4.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" - -[[package]] -name = "byteorder" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "cargo_toml" -version = "0.8.1" +version = "0.17.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513d17226888c7b8283ac02a1c1b0d8a9d4cbf6db65dfadb79f598f5d7966fe9" +checksum = "8a969e13a7589e9e3e4207e153bae624ade2b5622fb4684a4923b23ec3d57719" dependencies = [ "serde", - "serde_derive", - "toml", + "toml 0.8.8", ] [[package]] name = "cast" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" -dependencies = [ - "rustc_version", -] +checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.60" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef611cc68ff783f18535d77ddd080185275713d852c4f5cbb6122c462a7a825c" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] name = "cfg-if" -version = "0.1.10" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ - "libc", - "num-integer", + "android-tzdata", + "iana-time-zone", + "js-sys", "num-traits", - "time", - "winapi", + "serde", + "wasm-bindgen", + "windows-targets 0.48.5", +] + +[[package]] +name = "ciborium" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" +dependencies = [ + "ciborium-io", + "ciborium-ll", + "serde", +] + +[[package]] +name = "ciborium-io" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" + +[[package]] +name = "ciborium-ll" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" +dependencies = [ + "ciborium-io", + "half", ] [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ - "ansi_term 0.11.0", + "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "strsim 0.8.0", "term_size", "textwrap", @@ -232,43 +281,70 @@ dependencies = [ "vec_map", ] +[[package]] +name = "clap" +version = "4.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52bdc885e4cacc7f7c9eedc1ef6da641603180c783c41a15c264944deeaab642" +dependencies = [ + "clap_builder", +] + +[[package]] +name = "clap_builder" +version = "4.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" +dependencies = [ + "anstyle", + "clap_lex", +] + +[[package]] +name = "clap_lex" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" + [[package]] name = "console" -version = "0.12.0" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0b1aacfaffdbff75be81c15a399b4bedf78aaefe840e8af1d299ac2ade885d2" +checksum = "c926e00cc70edefdc64d3a5ff31cc65bb97a3460097762bd23afb4d8145fccf8" dependencies = [ "encode_unicode", "lazy_static", "libc", - "regex", - "terminal_size", - "termios", "unicode-width", - "winapi", - "winapi-util", + "windows-sys 0.45.0", ] +[[package]] +name = "core-foundation-sys" +version = "0.8.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" + [[package]] name = "criterion" -version = "0.3.3" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70daa7ceec6cf143990669a04c7df13391d55fb27bd4079d252fca774ba244d8" +checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" dependencies = [ - "atty", + "anes", "cast", - "clap", + "ciborium", + "clap 4.4.13", "criterion-plot", - "csv", + "is-terminal", "itertools", - "lazy_static", "num-traits", + "once_cell", "oorandom", "plotters", "rayon", "regex", "serde", - "serde_cbor", "serde_derive", "serde_json", "tinytemplate", @@ -277,98 +353,50 @@ dependencies = [ [[package]] name = "criterion-plot" -version = "0.4.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e022feadec601fba1649cfa83586381a4ad31c6bf3a9ab7d408118b05dd9889d" +checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" dependencies = [ "cast", "itertools", ] -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils", - "maybe-uninit", -] - [[package]] name = "crossbeam-deque" -version = "0.7.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ + "cfg-if", "crossbeam-epoch", "crossbeam-utils", - "maybe-uninit", ] [[package]] name = "crossbeam-epoch" -version = "0.8.2" +version = "0.9.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +checksum = "0e3681d554572a651dda4186cd47240627c3d0114d45a95f6ad27f2f22e7548d" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", - "lazy_static", - "maybe-uninit", - "memoffset", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.7.2" +version = "0.8.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +checksum = "c3a430a770ebd84726f584a90ee7f020d28db52c6d02138900f22341f866d39c" dependencies = [ - "autocfg", "cfg-if", - "lazy_static", -] - -[[package]] -name = "csv" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" -dependencies = [ - "bstr", - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" -dependencies = [ - "memchr", -] - -[[package]] -name = "ctor" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbaabec2c953050352311293be5c6aba8e141ba19d6811862b232d6fd020484" -dependencies = [ - "quote", - "syn", ] [[package]] name = "darling" -version = "0.10.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" dependencies = [ "darling_core", "darling_macro", @@ -376,27 +404,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.9.3", - "syn", + "strsim 0.10.0", + "syn 2.0.48", ] [[package]] name = "darling_macro" -version = "0.10.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn", + "syn 2.0.48", ] [[package]] @@ -404,28 +432,32 @@ name = "demo" version = "0.0.0" [[package]] -name = "difference" -version = "2.0.0" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] [[package]] -name = "doc-comment" -version = "0.3.3" +name = "diff" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] -name = "dtoa" -version = "0.4.6" +name = "doc-comment" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.6.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "encode_unicode" @@ -440,12 +472,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ "atty", - "humantime", + "humantime 1.3.0", + "log", + "regex", + "termcolor", +] + +[[package]] +name = "env_logger" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +dependencies = [ + "humantime 2.1.0", + "is-terminal", "log", "regex", "termcolor", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "failure" version = "0.1.8" @@ -464,10 +525,16 @@ checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] +[[package]] +name = "fastrand" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" + [[package]] name = "fehler" version = "1.0.0" @@ -485,7 +552,7 @@ checksum = "ccb5acb1045ebbfa222e2c50679e392a71dd77030b78fb0189f2d9c5974400f9" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -494,17 +561,26 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + [[package]] name = "fs_extra" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" [[package]] name = "gen" version = "0.0.0" dependencies = [ - "ansi_term 0.12.1", + "ansi_term", "askama", "cargo_toml", "chrono", @@ -514,7 +590,7 @@ dependencies = [ "globset", "libc", "log", - "pretty_env_logger", + "pretty_env_logger 0.4.0", "regex", "serde", "serde_yaml", @@ -528,28 +604,28 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.15" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" dependencies = [ "cfg-if", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "gimli" -version = "0.22.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "git2" -version = "0.13.11" +version = "0.13.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e094214efbc7fdbbdee952147e493b00e99a4e52817492277e98967ae918165" +checksum = "f29229cc1b24c0e6062f6e742aa3e256492a5323365e5ed3413599f8a5eff7d6" dependencies = [ - "bitflags", + "bitflags 1.3.2", "libc", "libgit2-sys", "log", @@ -560,52 +636,76 @@ dependencies = [ [[package]] name = "globset" -version = "0.4.5" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ad1da430bd7281dde2576f44c84cc3f0f7b475e7202cd503042dff01a8c8120" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" dependencies = [ "aho-corasick", "bstr", - "fnv", "log", - "regex", + "regex-automata", + "regex-syntax", ] [[package]] name = "half" -version = "1.6.0" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36fab90f82edc3c747f9d438e06cf0a491055896f2a279638bb5beed6c40177" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "heck" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + [[package]] name = "hermit-abi" -version = "0.1.16" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c30f6d0bc6b00693347368a67d41b58f2fb851215ff1da49e90fe2c5c667151" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" + [[package]] name = "hex" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "humansize" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" +checksum = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026" [[package]] name = "humantime" @@ -616,6 +716,35 @@ dependencies = [ "quick-error", ] +[[package]] +name = "humantime" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "iana-time-zone" +version = "0.1.59" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -624,29 +753,26 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ - "matches", "unicode-bidi", "unicode-normalization", ] [[package]] name = "ignore" -version = "0.4.16" +version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22dcbf2a4a289528dbef21686354904e1c694ac642610a9bff9e7df730d9ec72" +checksum = "747ad1b4ae841a78e8aba0d63adbfbeaea26b517b63705d47856b73015d27060" dependencies = [ - "crossbeam-utils", + "crossbeam-deque", "globset", - "lazy_static", "log", "memchr", - "regex", + "regex-automata", "same-file", - "thread_local", "walkdir", "winapi-util", ] @@ -655,7 +781,7 @@ dependencies = [ name = "imdl" version = "0.1.13" dependencies = [ - "ansi_term 0.12.1", + "ansi_term", "atty", "bendy", "chrono", @@ -672,7 +798,7 @@ dependencies = [ "md5", "open", "pretty_assertions", - "pretty_env_logger", + "pretty_env_logger 0.5.0", "rand", "rayon", "regex", @@ -685,8 +811,8 @@ dependencies = [ "snafu", "static_assertions", "structopt", - "strum 0.19.2", - "strum_macros 0.19.2", + "strum 0.25.0", + "strum_macros 0.25.3", "tempfile", "temptree", "unicode-width", @@ -705,35 +831,87 @@ dependencies = [ "regex", ] +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", + "serde", +] + +[[package]] +name = "is-docker" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3" +dependencies = [ + "once_cell", +] + +[[package]] +name = "is-terminal" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bad00257d07be169d870ab665980b06cdb366d792ad690bf2e76876dc503455" +dependencies = [ + "hermit-abi 0.3.3", + "rustix", + "windows-sys 0.52.0", +] + +[[package]] +name = "is-wsl" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5" +dependencies = [ + "is-docker", + "once_cell", +] + [[package]] name = "itertools" -version = "0.9.0" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.6" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.21" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" +checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.45" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca059e81d9486668f12d455a4ea6daa600bd408134cd17e3d3fb5a32d1f016f8" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -752,15 +930,15 @@ checksum = "441225017b106b9f902e97947a6d31e44ebcf274b91bdbfb51e5c477fcd468e5" [[package]] name = "libc" -version = "0.2.78" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa7087f49d294270db4e1928fc110c976cd4b9e5a16348e0a1df09afa99e6c98" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libgit2-sys" -version = "0.12.13+1.0.1" +version = "0.12.26+1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069eea34f76ec15f2822ccf78fe0cdb8c9016764d0a12865278585a74dbdeae5" +checksum = "19e1c899248e606fbfe68dcb31d8b0176ebab833b103824af31bddf4b7457494" dependencies = [ "cc", "libc", @@ -772,9 +950,9 @@ dependencies = [ [[package]] name = "libssh2-sys" -version = "0.2.19" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca46220853ba1c512fc82826d0834d87b06bcd3c2a42241b7de72f3d2fe17056" +checksum = "b094a36eb4b8b8c8a7b4b8ae43b2944502be3e59cd87687595cf6b0a71b3f4ca" dependencies = [ "cc", "libc", @@ -786,9 +964,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.2" +version = "1.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655" +checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" dependencies = [ "cc", "libc", @@ -798,24 +976,21 @@ dependencies = [ [[package]] name = "linked-hash-map" -version = "0.5.3" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] -name = "log" -version = "0.4.11" +name = "linux-raw-sys" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" -dependencies = [ - "cfg-if", -] +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] -name = "matches" -version = "0.1.8" +name = "log" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "maybe-uninit" @@ -831,27 +1006,17 @@ checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" -version = "2.3.3" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" - -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg", -] +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" [[package]] name = "miniz_oxide" -version = "0.4.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c60c0dfe32c10b43a144bad8fc83538c52f58302c92300ea7ec7bf7b38d5a7b9" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", - "autocfg", ] [[package]] @@ -862,43 +1027,23 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "nom" -version = "5.1.2" +version = "5.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "08959a387a676302eebf4ddbcbc611da04285579f76f88ee0506c63b1a61dd4b" dependencies = [ "memchr", "version_check", ] -[[package]] -name = "num-integer" -version = "0.1.43" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d59457e662d541ba17869cf51cf177c0b5f0cbf476c66bdc90bf1edac4f875b" -dependencies = [ - "autocfg", - "num-traits", -] - [[package]] name = "num-traits" -version = "0.2.12" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - [[package]] name = "number_prefix" version = "0.3.0" @@ -907,44 +1052,48 @@ checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" [[package]] name = "object" -version = "0.20.0" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab52be62400ca80aa00285d25253d7f7c437b7375c4de678f5405d3afe82ca5" +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +dependencies = [ + "memchr", +] [[package]] name = "once_cell" -version = "1.12.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" -version = "11.1.2" +version = "11.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a170cebd8021a008ea92e4db85a72f80b35df514ec664b296fdcbb654eac0b2c" +checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "open" -version = "1.4.0" +version = "5.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c283bf0114efea9e42f1a60edea9859e8c47528eae09d01df4b29c1e489cc48" +checksum = "90878fb664448b54c4e592455ad02831e23a3f7e157374a8b95654731aac7349" dependencies = [ - "winapi", + "is-wsl", + "libc", + "pathdiff", ] [[package]] name = "openssl-probe" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.80" +version = "0.9.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" +checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" dependencies = [ - "autocfg", "cc", "libc", "pkg-config", @@ -952,54 +1101,71 @@ dependencies = [ ] [[package]] -name = "output_vt100" -version = "0.1.2" +name = "pathdiff" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" -dependencies = [ - "winapi", -] +checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pkg-config" -version = "0.3.18" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" +checksum = "69d3587f8a9e599cc7ec2c00e331f71c4e69a5f9a4b8a6efd5b07466b9736f9a" [[package]] name = "plotters" -version = "0.2.15" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d1685fbe7beba33de0330629da9d955ac75bd54f33d7b79f9a895590124f6bb" +checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" dependencies = [ - "js-sys", "num-traits", + "plotters-backend", + "plotters-svg", "wasm-bindgen", "web-sys", ] +[[package]] +name = "plotters-backend" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" + +[[package]] +name = "plotters-svg" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" -version = "0.2.9" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "pretty_assertions" -version = "0.6.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" dependencies = [ - "ansi_term 0.11.0", - "ctor", - "difference", - "output_vt100", + "diff", + "yansi", ] [[package]] @@ -1008,7 +1174,17 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" dependencies = [ - "env_logger", + "env_logger 0.7.1", + "log", +] + +[[package]] +name = "pretty_env_logger" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "865724d4dbe39d9f3dd3b52b88d859d66bcb2d6a0acfd5ea68a65fb66d4bdc1c" +dependencies = [ + "env_logger 0.10.1", "log", ] @@ -1021,7 +1197,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -1038,11 +1214,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1053,31 +1229,29 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.7" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] [[package]] name = "rand" -version = "0.7.3" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "getrandom", "libc", "rand_chacha", "rand_core", - "rand_hc", ] [[package]] name = "rand_chacha" -version = "0.2.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", "rand_core", @@ -1085,109 +1259,101 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.5.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ "getrandom", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core", -] - [[package]] name = "rayon" -version = "1.4.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf6960dc9a5b4ee8d3e4c5787b4a112a8818e0290a42ff664ad60692fdf2032" +checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" dependencies = [ - "autocfg", - "crossbeam-deque", "either", "rayon-core", ] [[package]] name = "rayon-core" -version = "1.8.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c4fec834fb6e6d2dd5eece3c7b432a52f0ba887cf40e595190c4107edc08bf" +checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "lazy_static", - "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.1.57" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] [[package]] name = "regex" -version = "1.3.9" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", + "regex-automata", "regex-syntax", - "thread_local", ] [[package]] name = "regex-automata" -version = "0.1.9" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ - "byteorder", + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.18" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustc-demangle" -version = "0.1.16" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] -name = "rustc_version" -version = "0.2.3" +name = "rustix" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ - "semver", + "bitflags 2.4.1", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", ] +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -1198,32 +1364,11 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" -version = "1.0.116" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fe57af81d28386a513cbc6858332abc6117cfdb5999647c6444b8f43a370a5" +checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" dependencies = [ "serde_derive", ] @@ -1241,99 +1386,114 @@ dependencies = [ [[package]] name = "serde_bytes" -version = "0.11.5" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" dependencies = [ "serde", ] -[[package]] -name = "serde_cbor" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e18acfa2f90e8b735b2836ab8d538de304cbb6729a7360729ea5a895d15a622" -dependencies = [ - "half", - "serde", -] - [[package]] name = "serde_derive" -version = "1.0.116" +version = "1.0.195" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f630a6370fd8e457873b4bd2ffdae75408bc291ba72be773772a4c2a065d9ae8" +checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.58" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a230ea9107ca2220eea9d46de97eddcb04cd00e92d13dda78e478dd33fa82bd4" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +dependencies = [ + "serde", +] + [[package]] name = "serde_with" -version = "1.5.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f87df303fd746404ca055fffb3a1850243ee3404f9bda4dc5760132814dd0734" +checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.1.0", "serde", + "serde_json", "serde_with_macros", + "time", ] [[package]] name = "serde_with_macros" -version = "1.2.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe2c6a4cb9be4c26e73a98dc94fdd90b876971e3b575eeed6d4b82c7d17aa4a5" +checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" dependencies = [ "darling", "proc-macro2", "quote", - "syn", + "syn 2.0.48", ] [[package]] name = "serde_yaml" -version = "0.8.13" +version = "0.8.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3e2dd40a7cdc18ca80db804b7f461a39bb721160a85c9a1fa30134bf3c02a5" +checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" dependencies = [ - "dtoa", - "linked-hash-map", + "indexmap 1.9.3", + "ryu", "serde", "yaml-rust", ] [[package]] name = "sha1" -version = "0.6.0" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" +dependencies = [ + "sha1_smol", +] + +[[package]] +name = "sha1_smol" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" [[package]] name = "smallvec" -version = "0.6.13" +version = "0.6.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" dependencies = [ "maybe-uninit", ] [[package]] name = "snafu" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c4e6046e4691afe918fd1b603fd6e515bcda5388a1092a9edbada307d159f09" +checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" dependencies = [ "doc-comment", "snafu-derive", @@ -1341,13 +1501,13 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7073448732a89f2f3e6581989106067f403d378faeafb4a50812eb814170d3e5" +checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1364,32 +1524,32 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strsim" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structopt" -version = "0.3.18" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33f6461027d7f08a13715659b2948e1602c31a3756aeae9378bfe7518c72e82" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ - "clap", + "clap 2.34.0", "lazy_static", "structopt-derive", ] [[package]] name = "structopt-derive" -version = "0.4.11" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92e775028122a4b3dd55d58f14fc5120289c69bee99df1d117ae30f84b225c9" +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1400,9 +1560,9 @@ checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" [[package]] name = "strum" -version = "0.19.2" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3924a58d165da3b7b2922c667ab0673c7b5fd52b5c19ea3442747bcb3cd15abe" +checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" [[package]] name = "strum_macros" @@ -1410,66 +1570,77 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "strum_macros" -version = "0.19.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2ab682ecdcae7f5f45ae85cd7c1e6c8e68ea42c8a612d47fedf831c037146a" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro2", "quote", - "syn", + "rustversion", + "syn 2.0.48", ] [[package]] name = "syn" -version = "1.0.42" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c51d92969d209b54a98397e1b91c8ae82d8c87a7bb87df0b29aa2ad81454228" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.48" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "synstructure" -version = "0.12.4" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "unicode-xid", ] [[package]] name = "tempfile" -version = "3.1.0" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "01ce4141aa927a6d1bd34a041795abd0db1cccba5d5f24b009f694bdf3a1f3fa" dependencies = [ "cfg-if", - "libc", - "rand", + "fastrand", "redox_syscall", - "remove_dir_all", - "winapi", + "rustix", + "windows-sys 0.52.0", ] [[package]] name = "temptree" -version = "0.0.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b41283c421539cd57fda2bdae139a0e08992dba973cd4ba859765c867ad591" +checksum = "8fda94d8251b40088cb769576f436da19ac1d1ae792c97d0afe1cadc890c8630" dependencies = [ "tempfile", ] @@ -1486,140 +1657,176 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" dependencies = [ "winapi-util", ] [[package]] -name = "terminal_size" -version = "0.1.13" +name = "textwrap" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a14cd9f8c72704232f0bfc8455c0e861f0ad4eb60cc9ec8a170e231414c1e13" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "libc", - "winapi", + "term_size", + "unicode-width", ] [[package]] -name = "termios" -version = "0.3.2" +name = "time" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0fcee7b24a25675de40d5bb4de6e41b0df07bc9856295e7e2b3a3600c400c2" +checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" dependencies = [ - "libc", + "deranged", + "itoa", + "powerfmt", + "serde", + "time-core", + "time-macros", ] [[package]] -name = "textwrap" -version = "0.11.0" +name = "time-core" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" dependencies = [ - "term_size", - "unicode-width", + "time-core", ] [[package]] -name = "thread_local" -version = "1.1.4" +name = "tinytemplate" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" dependencies = [ - "once_cell", + "serde", + "serde_json", ] [[package]] -name = "time" -version = "0.1.44" +name = "tinyvec" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "tinyvec_macros", ] [[package]] -name = "tinytemplate" -version = "1.1.0" +name = "tinyvec_macros" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d3dc76004a03cec1c5932bca4cdc2e39aaa798e3f82363dd94f9adf6098c12f" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", - "serde_json", ] [[package]] -name = "tinyvec" -version = "0.3.4" +name = "toml" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" +checksum = "a1a195ec8c9da26928f773888e0742ca3ca1040c6cd859c919c9f59c1954ab35" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", +] [[package]] -name = "toml" -version = "0.5.6" +name = "toml_datetime" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] [[package]] -name = "unicode-bidi" -version = "0.3.4" +name = "toml_edit" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" dependencies = [ - "matches", + "indexmap 2.1.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", ] +[[package]] +name = "unicode-bidi" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + [[package]] name = "unicode-normalization" -version = "0.1.13" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" +checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "unicode-xid" -version = "0.2.1" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "url" -version = "2.1.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ + "form_urlencoded", "idna", - "matches", "percent-encoding", "serde", ] [[package]] name = "vcpkg" -version = "0.2.10" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vec_map" @@ -1629,38 +1836,31 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", - "winapi", "winapi-util", ] [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.68" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac64ead5ea5f05873d7c12b545865ca2b8d28adfc50a49b84770a3a97265d42" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1668,24 +1868,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.68" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f22b422e2a757c35a73774860af8e112bff612ce6cb604224e8e47641a9e4f68" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn", + "syn 2.0.48", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.68" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13312a745c08c469f0b292dd2fcd6411dba5f7160f593da6ef69b64e407038" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1693,28 +1893,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.68" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f249f06ef7ee334cc3b8ff031bfc11ec99d00f34d86da7498396dc1e3b1498fe" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.68" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d649a3145108d7d3fbcde896a468d1bd636791823c9921135218ad89be08307" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.45" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf6ef87ad7ae8008e15a355ce696bed26012b7caa21605188cfd8214ab51e2d" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -1738,9 +1938,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -1751,11 +1951,224 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + +[[package]] +name = "winnow" +version = "0.5.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8434aeec7b290e8da5c3f0d628cb0eac6cabcb31d14bb74f779a08109a5914d6" +dependencies = [ + "memchr", +] + [[package]] name = "yaml-rust" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39f0c922f1a334134dc2f7a8b67dc5d25f0735263feec974345ff706bcf20b0d" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" dependencies = [ "linked-hash-map", ] + +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" diff --git a/Cargo.toml b/Cargo.toml index 1f8c3cb5..2d2e046f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,54 +1,53 @@ [package] -name = "imdl" -version = "0.1.13" +name = "imdl" +version = "0.1.13" description = "📦 A 40' shipping container for the internet" -authors = ["Casey Rodarmor "] -license = "CC0-1.0" -readme = "README.md" -keywords = ["p2p", "sharing", "bittorrent", "torrent"] -categories = ["command-line-utilities"] -homepage = "https://github.com/casey/intermodal" -repository = "https://github.com/casey/intermodal" -edition = "2018" +authors = ["Casey Rodarmor "] +license = "CC0-1.0" +readme = "README.md" +keywords = ["p2p", "sharing", "bittorrent", "torrent"] +categories = ["command-line-utilities"] +homepage = "https://github.com/casey/intermodal" +repository = "https://github.com/casey/intermodal" +edition = "2021" default-run = "imdl" [features] default = [] -bench = [] [dependencies] -ansi_term = "0.12.0" -atty = "0.2.0" -chrono = "0.4.1" -console = "0.12.0" -globset = "0.4.0" -hex = "0.4.2" -ignore = "0.4.14" -lazy_static = "1.4.0" -lexiclean = "0.0.1" -libc = "0.2.0" -log = "0.4.8" -md5 = "0.7.0" -rand = "0.7.3" -open = "1.4.0" -pretty_assertions = "0.6.0" -pretty_env_logger = "0.4.0" -rayon = "<=1.6.0" -regex = "1.0.0" -serde-hex = "0.1.0" -serde_bytes = "0.11.0" -serde_json = "1.0.57" -serde_with = "1.4.0" -sha1 = "0.6.0" -snafu = "0.6.0" +ansi_term = "0.12.0" +atty = "0.2.0" +chrono = "0.4.1" +console = "0.15.7" +globset = "0.4.0" +hex = "0.4.2" +ignore = "0.4.14" +lazy_static = "1.4.0" +lexiclean = "0.0.1" +libc = "0.2.0" +log = "0.4.8" +md5 = "0.7.0" +open = "5.0.1" +pretty_assertions = "1.4.0" +pretty_env_logger = "0.5.0" +rand = "0.8.5" +rayon = "1.8.0" +regex = "1.10.2" +serde-hex = "0.1.0" +serde_bytes = "0.11.0" +serde_json = "1.0.57" +serde_with = "3.4.0" +sha1 = "0.6.0" +snafu = "0.6.0" static_assertions = "1.0.0" -strum = "0.19.0" -strum_macros = "0.19.0" -tempfile = "3.0.0" -unicode-width = "0.1.0" +strum = "0.25.0" +strum_macros = "0.25.3" +tempfile = "3.0.0" +unicode-width = "0.1.0" [dependencies.bendy] -version = "0.3.0" +version = "0.3.0" features = ["serde"] [dependencies.indicatif] @@ -56,11 +55,11 @@ version = "0.14.0" package = "imdl-indicatif" [dependencies.serde] -version = "1.0.103" +version = "1.0.103" features = ["derive"] [dependencies.structopt] -version = "0.3.0" +version = "0.3.0" features = ["default", "wrap_help"] [dependencies.url] @@ -68,8 +67,8 @@ version = "2.1.1" features = ["serde"] [dev-dependencies] -criterion = "0.3.0" -temptree = "0.0.0" +criterion = "0.5.1" +temptree = "0.2.0" [workspace] members = [ @@ -81,7 +80,7 @@ members = [ ] [[bench]] -name = "hasher" +name = "hasher" harness = false # enable release build link time optimization diff --git a/bin/demo/Cargo.toml b/bin/demo/Cargo.toml index 89d09208..5dd20223 100644 --- a/bin/demo/Cargo.toml +++ b/bin/demo/Cargo.toml @@ -2,4 +2,5 @@ name = "demo" version = "0.0.0" authors = ["Casey Rodarmor "] -edition = "2018" +edition = "2021" +publish = false diff --git a/bin/demo/src/main.rs b/bin/demo/src/main.rs index b4d7b70c..852aace9 100644 --- a/bin/demo/src/main.rs +++ b/bin/demo/src/main.rs @@ -74,7 +74,7 @@ fn main() -> Result<()> { sleep(enter_delay); print("\n")?; - run(&command)?; + run(command)?; } Ok(()) diff --git a/bin/gen/Cargo.toml b/bin/gen/Cargo.toml index 1279cfa7..13dc42dc 100644 --- a/bin/gen/Cargo.toml +++ b/bin/gen/Cargo.toml @@ -1,32 +1,32 @@ [package] -name = "gen" +name = "gen" version = "0.0.0" authors = ["Casey Rodarmor "] -edition = "2018" +edition = "2021" publish = false [dependencies] -ansi_term = "0.12.1" -askama = "0.9.0" -cargo_toml = "0.8.0" -chrono = "0.4.11" -fehler = "1.0.0" -fs_extra = "1.1.0" -git2 = "0.13.1" -globset = "0.4.5" -libc = "0.2.69" -log = "0.4.8" +ansi_term = "0.12.1" +askama = "0.9.0" +cargo_toml = "0.17.0" +chrono = "0.4.11" +fehler = "1.0.0" +fs_extra = "1.1.0" +git2 = "0.13.1" +globset = "0.4.5" +libc = "0.2.69" +log = "0.4.8" pretty_env_logger = "0.4.0" -regex = "1.3.6" -serde_yaml = "0.8.11" -snafu = "0.6.0" -structopt = "0.3.12" -strum = "0.18.0" -strum_macros = "0.18.0" -tempfile = "3.1.0" +regex = "1.3.6" +serde_yaml = "0.8.11" +snafu = "0.6.0" +structopt = "0.3.12" +strum = "0.18.0" +strum_macros = "0.18.0" +tempfile = "3.1.0" [dependencies.serde] -version = "1.0.106" +version = "1.0.106" features = ["derive"] [dependencies.url] diff --git a/bin/gen/config.yaml b/bin/gen/config.yaml index 3ad9e938..33d4c8aa 100644 --- a/bin/gen/config.yaml +++ b/bin/gen/config.yaml @@ -19,6 +19,10 @@ examples: text: "Intermodal can be used to create `.torrent` files:" code: "imdl torrent create --input foo" +- command: imdl torrent dump + text: "Intermodal can be used to dump arbitrary bencode files:" + code: "imdl torrent dump --input foo.torrent" + - command: imdl torrent from-link text: "Intermodal can be used to create a `.torrent` file from a magnet link:" code: "imdl torrent from-link magnet:?foo" diff --git a/bin/gen/src/bin_subcommand.rs b/bin/gen/src/bin_subcommand.rs index b84c667c..d126898b 100644 --- a/bin/gen/src/bin_subcommand.rs +++ b/bin/gen/src/bin_subcommand.rs @@ -24,7 +24,7 @@ impl BinSubcommand { let block = &wide_help[marker + MARKER.len()..]; for line in block.lines() { - let name = line.trim().split_whitespace().next().unwrap(); + let name = line.split_whitespace().next().unwrap(); subcommands.push(name.into()); } } @@ -53,7 +53,7 @@ impl BinSubcommand { info!("Generating man page for `{}`", command_line); - let name = command_line.replace(" ", "\\ "); + let name = command_line.replace(' ', "\\ "); let help = self.help()?; @@ -125,7 +125,7 @@ impl BinSubcommand { for name in &self.command { slug.push('-'); - slug.push_str(&name); + slug.push_str(name); } slug @@ -136,7 +136,7 @@ impl BinSubcommand { for name in &self.command { line.push(' '); - line.push_str(&name); + line.push_str(name); } line diff --git a/bin/gen/src/readme.rs b/bin/gen/src/readme.rs index a0956408..42d1cddb 100644 --- a/bin/gen/src/readme.rs +++ b/bin/gen/src/readme.rs @@ -26,8 +26,7 @@ impl Readme { let slug = text .to_lowercase() .replace(' ', "-") - .replace('.', "") - .replace('&', ""); + .replace(['.', '&'], ""); lines.push(format!("{}- [{}](#{})", indentation, text, slug)); } diff --git a/bin/gen/src/subcommand.rs b/bin/gen/src/subcommand.rs index 8fc77a90..9b1df107 100644 --- a/bin/gen/src/subcommand.rs +++ b/bin/gen/src/subcommand.rs @@ -31,7 +31,7 @@ fn blank(path: impl AsRef, title: &str) { title ); - fs::write(&path, text).context(error::Filesystem { path })?; + fs::write(path, text).context(error::Filesystem { path })?; } #[throws] @@ -64,10 +64,10 @@ impl Subcommand { #[throws] pub(crate) fn all(project: &Project) { - Self::completion_scripts(&project)?; - Self::readme(&project)?; - Self::book(&project)?; - Self::man(&project)?; + Self::completion_scripts(project)?; + Self::readme(project)?; + Self::book(project)?; + Self::man(project)?; } #[throws] @@ -178,7 +178,7 @@ impl Subcommand { fs::write(&dst, page).context(error::Filesystem { path: dst })?; } - clean_dir(&out.join("references"))?; + clean_dir(out.join("references"))?; for section in &project.config.references { section.render_to(out.join(section.path()))?; diff --git a/bin/gen/src/table.rs b/bin/gen/src/table.rs index 18d91a84..91cc9bb8 100644 --- a/bin/gen/src/table.rs +++ b/bin/gen/src/table.rs @@ -18,8 +18,7 @@ impl Display for Table { rows.push(row.entries()); } - let mut widths = Vec::new(); - widths.resize(rows[0].len(), 0); + let mut widths = vec![0; rows[0].len()]; for row in &rows { for (width, entry) in widths.iter_mut().zip(row) { diff --git a/bin/gen/src/template_ext.rs b/bin/gen/src/template_ext.rs index a56147b4..ae54f9cd 100644 --- a/bin/gen/src/template_ext.rs +++ b/bin/gen/src/template_ext.rs @@ -8,7 +8,7 @@ pub(crate) trait TemplateExt { fn render_to(&self, path: impl AsRef) { let path = path.as_ref(); let text = self.render_newline()?; - fs::write(&path, text).context(error::Filesystem { path })?; + fs::write(path, text).context(error::Filesystem { path })?; } } diff --git a/justfile b/justfile index 6e11aa2c..100caa3e 100644 --- a/justfile +++ b/justfile @@ -11,8 +11,8 @@ log := 'warn' export RUST_LOG := log # watch filesystem for changes and rerun tests -watch +ARGS='': - cargo watch --clear --exec 'test {{ARGS}}' +watch +ARGS='test': + cargo watch --clear --exec '{{ARGS}}' # show stats about torrents at `PATH` stats PATH: diff --git a/src/assert_matches.rs b/src/assert_matches.rs index b9822e99..3464ce7e 100644 --- a/src/assert_matches.rs +++ b/src/assert_matches.rs @@ -1,5 +1,5 @@ macro_rules! assert_matches { - ($expression:expr, $( $pattern:pat )|+ $( if $guard:expr )?) => { + ($expression:expr, $( $pattern:pat_param )|+ $( if $guard:expr )?) => { match $expression { $( $pattern )|+ $( if $guard )? => {} left => panic!( diff --git a/src/bytes.rs b/src/bytes.rs index 92128319..b26bc2da 100644 --- a/src/bytes.rs +++ b/src/bytes.rs @@ -192,9 +192,9 @@ impl Display for Bytes { DISPLAY_SUFFIXES[i - 1] }; - let formatted = format!("{:.2}", value); + let formatted = format!("{value:.2}"); let trimmed = formatted.trim_end_matches('0').trim_end_matches('.'); - write!(f, "{} {}", trimmed, suffix) + write!(f, "{trimmed} {suffix}") } } @@ -221,8 +221,7 @@ mod tests { assert_eq!( text.parse::().unwrap(), Bytes(*value), - "text: {}", - text + "text: {text}", ); } } diff --git a/src/common.rs b/src/common.rs index 2d159826..103ead2d 100644 --- a/src/common.rs +++ b/src/common.rs @@ -85,6 +85,9 @@ pub(crate) use crate::{ // type aliases pub(crate) type Result = std::result::Result; +#[cfg(test)] +pub(crate) use test::*; + #[cfg(test)] mod test { // test stdlib types @@ -104,6 +107,3 @@ mod test { // test structs and enums pub(crate) use crate::{capture::Capture, test_env::TestEnv, test_env_builder::TestEnvBuilder}; } - -#[cfg(test)] -pub(crate) use test::*; diff --git a/src/consts.rs b/src/consts.rs index c83c1e70..3a3d69dd 100644 --- a/src/consts.rs +++ b/src/consts.rs @@ -77,7 +77,7 @@ mod tests { #[test] fn created_by() { let pattern = Regex::new( - r#"(?x) + r"(?x) imdl/ [0-9]+.[0-9]+.[0-9]+(-.*)? ( @@ -86,14 +86,13 @@ mod tests { [0-9a-f]{12} \) )? - "#, + ", ) .unwrap(); assert!( pattern.is_match(CREATED_BY_DEFAULT), - "Bad created by string: `{}`", - CREATED_BY_DEFAULT + "Bad created by string: `{CREATED_BY_DEFAULT}`", ); } } diff --git a/src/env.rs b/src/env.rs index 19db2857..98117023 100644 --- a/src/env.rs +++ b/src/env.rs @@ -124,9 +124,9 @@ impl Env { if let Err(error) = self.run() { if let Error::Clap { source } = error { if source.use_stderr() { - write!(&mut self.err, "{}", source).ok(); + write!(&mut self.err, "{source}").ok(); } else { - write!(&mut self.out, "{}", source).ok(); + write!(&mut self.out, "{source}").ok(); } match source.kind { ErrorKind::VersionDisplayed | ErrorKind::HelpDisplayed => Ok(()), @@ -217,7 +217,7 @@ impl Env { } }; - Ok(Input::new(source, data)) + Ok(Input { source, data }) } } @@ -246,8 +246,7 @@ mod tests { let err = env.err(); assert!( err.starts_with("error: Failed to parse announce URL:"), - "Unexpected standard error output: {}", - err + "Unexpected standard error output: {err}", ); assert_eq!(env.out(), ""); diff --git a/src/error.rs b/src/error.rs index 7dc174e4..3a29c47d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -74,8 +74,6 @@ pub(crate) enum Error { Network { source: io::Error }, #[snafu(display("Failed to invoke opener: {}", source))] OpenerInvoke { source: io::Error }, - #[snafu(display("Opener failed: {}", exit_status))] - OpenerExitStatus { exit_status: ExitStatus }, #[snafu(display("Output path already exists: `{}`", path.display()))] OutputExists { path: PathBuf }, #[snafu(display("Output target empty"))] diff --git a/src/file_error.rs b/src/file_error.rs index 28074e08..8d6ef683 100644 --- a/src/file_error.rs +++ b/src/file_error.rs @@ -83,11 +83,11 @@ impl Print for FileError { } match self { - Self::Io(io_error) => write!(stream, "{}", io_error)?, + Self::Io(io_error) => write!(stream, "{io_error}")?, Self::Missing => write!(stream, "File missing")?, Self::Directory => write!(stream, "Expected file but found directory")?, - Self::Surfeit(difference) => write!(stream, "{} too long", difference)?, - Self::Dearth(difference) => write!(stream, "{} too short", difference)?, + Self::Surfeit(difference) => write!(stream, "{difference} too long")?, + Self::Dearth(difference) => write!(stream, "{difference} too short")?, Self::Md5 { .. } => { return Err(io::Error::new( io::ErrorKind::Other, diff --git a/src/file_path.rs b/src/file_path.rs index 2127599a..377e4667 100644 --- a/src/file_path.rs +++ b/src/file_path.rs @@ -68,7 +68,7 @@ impl Display for FilePath { if i > 0 { write!(f, "/")?; } - write!(f, "{}", component)?; + write!(f, "{component}")?; } Ok(()) } diff --git a/src/host_port.rs b/src/host_port.rs index b53e249a..5fc9274f 100644 --- a/src/host_port.rs +++ b/src/host_port.rs @@ -128,7 +128,7 @@ impl<'de> Deserialize<'de> for HostPort { } else { Host::parse(&tuple.0) } - .map_err(|error| D::Error::custom(format!("Failed to parse node host: {}", error)))?; + .map_err(|error| D::Error::custom(format!("Failed to parse node host: {error}")))?; Ok(HostPort { host, @@ -147,7 +147,7 @@ mod tests { let node = HostPort { host, port }; let parsed: HostPort = text .parse() - .unwrap_or_else(|_| panic!("Failed to parse {}", text)); + .unwrap_or_else(|_| panic!("Failed to parse {text}")); assert_eq!(parsed, node); let ser = bendy::serde::to_bytes(&node).unwrap(); assert_eq!( @@ -197,7 +197,7 @@ mod tests { fn test_from_url() { let url = Url::parse("udp://imdl.io:12345").unwrap(); let host_port = HostPort::try_from(&url).unwrap(); - assert_eq!(host_port.host, Host::Domain("imdl.io".into())); + assert_eq!(host_port.host, Host::Domain::("imdl.io".into())); assert_eq!(host_port.port, 12345); } diff --git a/src/infohash.rs b/src/infohash.rs index f4888fea..a01d34e8 100644 --- a/src/infohash.rs +++ b/src/infohash.rs @@ -7,8 +7,8 @@ pub(crate) struct Infohash { impl Infohash { pub(crate) fn from_input(input: &Input) -> Result { - let value = Value::from_bencode(input.data()).map_err(|error| Error::MetainfoDecode { - input: input.source().clone(), + let value = Value::from_bencode(&input.data).map_err(|error| Error::MetainfoDecode { + input: input.source.clone(), error, })?; @@ -18,26 +18,26 @@ impl Infohash { .iter() .find(|pair: &(&Cow<[u8]>, &Value)| pair.0.as_ref() == b"info") .ok_or_else(|| Error::MetainfoValidate { - input: input.source().clone(), + input: input.source.clone(), source: MetainfoError::InfoMissing, })? .1; if let Value::Dict(_) = info { let encoded = info.to_bencode().map_err(|error| { - Error::internal(format!("Failed to re-encode info dictionary: {}", error)) + Error::internal(format!("Failed to re-encode info dictionary: {error}")) })?; Ok(Self::from_bencoded_info_dict(&encoded)) } else { Err(Error::MetainfoValidate { - input: input.source().clone(), + input: input.source.clone(), source: MetainfoError::InfoType, }) } } _ => Err(Error::MetainfoValidate { - input: input.source().clone(), + input: input.source.clone(), source: MetainfoError::Type, }), } diff --git a/src/input.rs b/src/input.rs index b3bbdf38..cabefe79 100644 --- a/src/input.rs +++ b/src/input.rs @@ -1,23 +1,11 @@ use crate::common::*; pub(crate) struct Input { - source: InputTarget, - data: Vec, + pub(crate) source: InputTarget, + pub(crate) data: Vec, } impl Input { - pub(crate) fn new(source: InputTarget, data: Vec) -> Input { - Self { source, data } - } - - pub(crate) fn data(&self) -> &[u8] { - &self.data - } - - pub(crate) fn source(&self) -> &InputTarget { - &self.source - } - #[cfg(test)] pub(crate) fn from_path(path: &Path) -> Result { let data = fs::read(path).context(error::Filesystem { path })?; diff --git a/src/invariant.rs b/src/invariant.rs index c391e8fa..9ca0a2e8 100644 --- a/src/invariant.rs +++ b/src/invariant.rs @@ -11,12 +11,12 @@ pub(crate) trait Invariant: Sized { impl Invariant for Option { fn invariant(self, invariant: D) -> Result { - self.ok_or_else(|| Error::internal(format!("Invariant violated: {}", invariant))) + self.ok_or_else(|| Error::internal(format!("Invariant violated: {invariant}"))) } } impl Invariant for Result { fn invariant(self, invariant: D) -> Result { - self.map_err(|err| Error::internal(format!("Invariant `{}` violated: {}", invariant, err))) + self.map_err(|err| Error::internal(format!("Invariant `{invariant}` violated: {err}"))) } } diff --git a/src/lib.rs b/src/lib.rs index b1860e56..455e8082 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,8 @@ clippy::module_name_repetitions )] +pub use run::run; + #[cfg(test)] #[macro_use] mod assert_matches; @@ -39,6 +41,7 @@ mod test_env_builder; mod capture; mod arguments; +pub mod bench; mod bytes; mod common; mod consts; @@ -95,8 +98,3 @@ mod use_color; mod verifier; mod walker; mod xor_args; - -#[cfg(feature = "bench")] -pub mod bench; - -pub use run::run; diff --git a/src/magnet_link.rs b/src/magnet_link.rs index 0717b740..9f61cf90 100644 --- a/src/magnet_link.rs +++ b/src/magnet_link.rs @@ -288,7 +288,7 @@ mod tests { #[test] fn link_from_str_infohash_length_error() { let infohash = "123456789abcedf"; - let link = format!("magnet:?xt=urn:btih:{}", infohash); + let link = format!("magnet:?xt=urn:btih:{infohash}"); let e = MagnetLink::from_str(&link).unwrap_err(); assert_matches!(e, Error::MagnetLinkParse { @@ -300,7 +300,7 @@ mod tests { #[test] fn link_from_str_infohash_bad_hex() { let infohash = "laaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; - let link = format!("magnet:?xt=urn:btih:{}", infohash); + let link = format!("magnet:?xt=urn:btih:{infohash}"); let e = MagnetLink::from_str(&link).unwrap_err(); assert_matches!(e, Error::MagnetLinkParse { @@ -327,7 +327,7 @@ mod tests { fn link_from_str_tracker_address() { let infohash = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; let bad_addr = "%imdl.io/announce"; - let link = format!("magnet:?xt=urn:btih:{}&tr={}", infohash, bad_addr); + let link = format!("magnet:?xt=urn:btih:{infohash}&tr={bad_addr}"); let e = MagnetLink::from_str(&link).unwrap_err(); assert_matches!(e, @@ -344,7 +344,7 @@ mod tests { fn link_from_str_peer_address() { let infohash = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; let bad_addr = "%imdl.io:13337"; - let link = format!("magnet:?xt=urn:btih:{}&x.pe={}", infohash, bad_addr); + let link = format!("magnet:?xt=urn:btih:{infohash}&x.pe={bad_addr}"); let e = MagnetLink::from_str(&link).unwrap_err(); assert_matches!(e, diff --git a/src/md5_digest.rs b/src/md5_digest.rs index bf4b5df9..78af8d5d 100644 --- a/src/md5_digest.rs +++ b/src/md5_digest.rs @@ -37,7 +37,7 @@ impl From for Md5Digest { impl Display for Md5Digest { fn fmt(&self, f: &mut Formatter) -> fmt::Result { for byte in &self.bytes { - write!(f, "{:02x}", byte)?; + write!(f, "{byte:02x}")?; } Ok(()) diff --git a/src/metainfo.rs b/src/metainfo.rs index 2e3ce74b..6f671c05 100644 --- a/src/metainfo.rs +++ b/src/metainfo.rs @@ -52,7 +52,7 @@ pub(crate) struct Metainfo { impl Metainfo { pub(crate) fn from_input(input: &Input) -> Result { - Self::deserialize(input.source(), input.data()) + Self::deserialize(&input.source, &input.data) } pub(crate) fn deserialize(source: &InputTarget, data: &[u8]) -> Result { @@ -70,7 +70,7 @@ impl Metainfo { pub(crate) fn dump(&self, path: impl AsRef) -> Result<(), Error> { let path = path.as_ref(); let bencode = bendy::serde::ser::to_bytes(&self).context(error::MetainfoSerialize)?; - fs::write(path, &bencode).context(error::Filesystem { path })?; + fs::write(path, bencode).context(error::Filesystem { path })?; Ok(()) } @@ -276,9 +276,9 @@ mod tests { let have = String::from_utf8_lossy(&have); assert_eq!(have, want); eprintln!("have:"); - eprintln!("{}", have); + eprintln!("{have}"); eprintln!("want:"); - eprintln!("{}", want); + eprintln!("{want}"); panic!("Unexpected representation..."); } } diff --git a/src/peer/client.rs b/src/peer/client.rs index 4ea21e8a..de8a589b 100644 --- a/src/peer/client.rs +++ b/src/peer/client.rs @@ -258,14 +258,12 @@ impl Client { // Respond to any serviceable ut_metadata request. Ignore errors. loop { - let msg = match seeder.conn.recv() { - Ok(msg) => msg, - Err(_) => continue, + let Ok(msg) = seeder.conn.recv() else { + continue; }; - let payload = match msg.parse_extended_payload() { - Ok((_, payload)) => payload, - Err(_) => continue, + let Ok((_, payload)) = msg.parse_extended_payload() else { + continue; }; let req: extended::UtMetadata = match Message::from_bencode(payload) { @@ -442,6 +440,7 @@ mod tests { } #[test] + #[ignore] fn connection_timeout() { let info = new_one_piece_info(); let infohash = info.infohash_lossy().unwrap(); diff --git a/src/platform_interface.rs b/src/platform_interface.rs index 8052f4ea..be4b03ee 100644 --- a/src/platform_interface.rs +++ b/src/platform_interface.rs @@ -10,13 +10,7 @@ pub(crate) trait PlatformInterface { } fn open_target(target: &OsStr) -> Result<(), Error> { - let exit_status = open::that(target).context(error::OpenerInvoke)?; - - if !exit_status.success() { - return Err(Error::OpenerExitStatus { exit_status }); - } - - Ok(()) + open::that(target).context(error::OpenerInvoke) } fn hidden(path: &Path) -> Result; diff --git a/src/run.rs b/src/run.rs index 9a0f2e7b..1325352d 100644 --- a/src/run.rs +++ b/src/run.rs @@ -21,7 +21,7 @@ pub fn run() -> Result<(), i32> { let mut env = match Env::main() { Ok(env) => env, Err(err) => { - eprintln!("{}", err); + eprintln!("{err}"); return Err(EXIT_FAILURE); } }; diff --git a/src/sha1_digest.rs b/src/sha1_digest.rs index 36229402..4595c8fb 100644 --- a/src/sha1_digest.rs +++ b/src/sha1_digest.rs @@ -32,7 +32,7 @@ impl From for Sha1Digest { impl Display for Sha1Digest { fn fmt(&self, f: &mut Formatter) -> fmt::Result { for byte in &self.bytes { - write!(f, "{:02x}", byte)?; + write!(f, "{byte:02x}")?; } Ok(()) diff --git a/src/subcommand/torrent.rs b/src/subcommand/torrent.rs index efca33dc..829070ab 100644 --- a/src/subcommand/torrent.rs +++ b/src/subcommand/torrent.rs @@ -2,6 +2,7 @@ use crate::common::*; mod announce; mod create; +mod dump; mod from_link; mod link; mod piece_length; @@ -18,6 +19,7 @@ mod verify; pub(crate) enum Torrent { Announce(announce::Announce), Create(create::Create), + Dump(dump::Dump), FromLink(from_link::FromLink), Link(link::Link), #[structopt(alias = "piece-size")] @@ -32,6 +34,7 @@ impl Torrent { match self { Self::Announce(announce) => announce.run(env), Self::Create(create) => create.run(env, options), + Self::Dump(dump) => dump.run(env), Self::FromLink(from_link) => from_link.run(env, options), Self::Link(link) => link.run(env), Self::PieceLength(piece_length) => piece_length.run(env), diff --git a/src/subcommand/torrent/announce.rs b/src/subcommand/torrent/announce.rs index b3cb0e95..77fedf75 100644 --- a/src/subcommand/torrent/announce.rs +++ b/src/subcommand/torrent/announce.rs @@ -227,8 +227,7 @@ mod tests { assert_eq!( env.err(), format!( - "Couldn't build tracker client. Cannot connect to tracker `{}`: only UDP trackers are supported\n", - https_tracker_url + "Couldn't build tracker client. Cannot connect to tracker `{https_tracker_url}`: only UDP trackers are supported\n", ) ); } diff --git a/src/subcommand/torrent/create.rs b/src/subcommand/torrent/create.rs index 086557ad..a505af79 100644 --- a/src/subcommand/torrent/create.rs +++ b/src/subcommand/torrent/create.rs @@ -1888,7 +1888,7 @@ Content Size 9 bytes fs::create_dir(&dir_src).unwrap(); fs::write(dir_contents, "baz").unwrap(); - fs::create_dir(&dir).unwrap(); + fs::create_dir(dir).unwrap(); fs::write(file_src, "bar").unwrap(); #[cfg(unix)] { @@ -3047,7 +3047,7 @@ Content Size 9 bytes let input = dir.path().join("foo"); - fs::write(&input, "").unwrap(); + fs::write(input, "").unwrap(); let mut env = test_env! { args: [ diff --git a/src/subcommand/torrent/create/create_content.rs b/src/subcommand/torrent/create/create_content.rs index ea1e5a11..d39e5a38 100644 --- a/src/subcommand/torrent/create/create_content.rs +++ b/src/subcommand/torrent/create/create_content.rs @@ -107,10 +107,7 @@ impl CreateContent { } fn torrent_path(input: &Path, name: &str) -> PathBuf { - input - .join("..") - .lexiclean() - .join(format!("{}.torrent", name)) + input.join("..").lexiclean().join(format!("{name}.torrent")) } } diff --git a/src/subcommand/torrent/create/create_step.rs b/src/subcommand/torrent/create/create_step.rs index 2ea6073f..3a6b175a 100644 --- a/src/subcommand/torrent/create/create_step.rs +++ b/src/subcommand/torrent/create/create_step.rs @@ -36,7 +36,7 @@ impl<'a> Step for CreateStep<'a> { }, Self::Hashing => write!(write, "Hashing pieces…"), - Self::Writing { output } => write!(write, "Writing metainfo to {}…", output), + Self::Writing { output } => write!(write, "Writing metainfo to {output}…"), } } } diff --git a/src/subcommand/torrent/dump.rs b/src/subcommand/torrent/dump.rs new file mode 100644 index 00000000..8ca03275 --- /dev/null +++ b/src/subcommand/torrent/dump.rs @@ -0,0 +1,175 @@ +use crate::common::*; + +const METAINFO_HELP: &str = "Dump arbitrary bencode in ``. If `` is `-`, \ + read metainfo from standard input."; + +const INPUT_POSITIONAL: &str = ""; + +const INPUT_FLAG: &str = "input-flag"; + +#[derive(StructOpt)] +pub(crate) struct Dump { + #[structopt( + name = INPUT_FLAG, + long = "input", + short = "i", + value_name = "INPUT", + empty_values = false, + parse(try_from_os_str = InputTarget::try_from_os_str), + help = METAINFO_HELP, + )] + input_flag: Option, + #[structopt( + name = INPUT_POSITIONAL, + value_name = "INPUT", + empty_values = false, + required_unless = INPUT_FLAG, + conflicts_with = INPUT_FLAG, + parse(try_from_os_str = InputTarget::try_from_os_str), + help = METAINFO_HELP, + )] + input_positional: Option, +} + +struct Fmt<'a>(&'a Value<'a>); + +fn fmt_string(f: &mut Formatter, string: &[u8]) -> fmt::Result { + if let Ok(string) = str::from_utf8(string) { + write!(f, "\"{string}\"")?; + } else { + write!(f, "0x")?; + for byte in string { + write!(f, "{byte:02x}")?; + } + } + + Ok(()) +} + +impl<'a> Display for Fmt<'a> { + fn fmt(&self, f: &mut Formatter) -> fmt::Result { + match &self.0 { + Value::Integer(integer) => write!(f, "{integer}")?, + Value::Dict(dict) => { + write!(f, "{{")?; + + for (i, (key, value)) in dict.iter().enumerate() { + if i > 0 { + write!(f, " ,")?; + } + fmt_string(f, key)?; + write!(f, ": ")?; + write!(f, "{}", Fmt(value))?; + } + + write!(f, "}}")?; + } + Value::List(list) => { + write!(f, "[")?; + for (i, element) in list.iter().enumerate() { + if i > 0 { + write!(f, ", ")?; + } + write!(f, "{}", Fmt(element))?; + } + write!(f, "]")?; + } + Value::Bytes(bytes) => fmt_string(f, bytes)?, + } + + Ok(()) + } +} + +impl Dump { + pub(crate) fn run(self, env: &mut Env) -> Result<(), Error> { + let target = xor_args( + "input_positional", + &self.input_positional, + "input_flag", + &self.input_flag, + )?; + + let input = env.read(target.clone())?; + + let value = Value::from_bencode(&input.data).unwrap(); + + outln!(env, "{}", Fmt(&value))?; + + Ok(()) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn require_input() { + let mut env = test_env! { + args: ["torrent", "dump"], + tree: {}, + }; + assert_matches!(env.run(), Err(Error::Clap { .. })); + + // flag is ok + let mut env = test_env! { + args: ["torrent", "dump", "--input", "foo"], + tree: {}, + }; + assert_matches!(env.run(), Err(Error::Filesystem { .. })); + + // positional is ok + let mut env = test_env! { + args: ["torrent", "dump", "foo"], + tree: {}, + }; + assert_matches!(env.run(), Err(Error::Filesystem { .. })); + + // both are fail + let mut env = test_env! { + args: ["torrent", "dump", "--input", "foo", "foo"], + tree: {}, + }; + assert_matches!(env.run(), Err(Error::Clap { .. })); + } + + #[test] + fn hex_string() { + assert_eq!( + Fmt(&Value::Bytes(b"\x80\x81".to_vec().into())).to_string(), + "0x8081", + ); + } + + #[test] + fn output() { + fn case(input: &'static str, output: &str) { + let mut env = test_env! { + args: ["torrent", "dump", "input.torrent"], + tree: { + "input.torrent": input, + }, + }; + + env.assert_ok(); + + assert_eq!(env.out(), output); + } + + case("0:", "\"\"\n"); + case("1:x", "\"x\"\n"); + + case("i-123e", "-123\n"); + case("i-1e", "-1\n"); + case("i0e", "0\n"); + case("i123e", "123\n"); + + case("le", "[]\n"); + case("li0ei1ei2ee", "[0, 1, 2]\n"); + + case("de", "{}\n"); + case("d1:xi0ee", "{\"x\": 0}\n"); + case("d3:xyzd3:abci0eee", "{\"xyz\": {\"abc\": 0}}\n"); + } +} diff --git a/src/subcommand/torrent/from_link.rs b/src/subcommand/torrent/from_link.rs index fb9bf340..209d038d 100644 --- a/src/subcommand/torrent/from_link.rs +++ b/src/subcommand/torrent/from_link.rs @@ -61,9 +61,8 @@ impl FromLink { let (tx, rx) = channel(); link.trackers.par_iter().for_each_with(tx, |s, x| { - let c = match tracker::Client::from_url(x) { - Ok(c) => c, - Err(_) => return, + let Ok(c) = tracker::Client::from_url(x) else { + return; }; if let Ok(list) = c.announce_exchange(&infohash) { for p in list { @@ -143,6 +142,7 @@ mod tests { } #[test] + #[ignore] fn test_no_info() { let tracker_url = "udp://1.2.3.4:1337"; let metainfo = Metainfo { @@ -222,7 +222,7 @@ mod tests { tree: {}, }; env.assert_ok(); - assert_eq!(metainfo, env.load_metainfo(format!("{}.torrent", infohash))); + assert_eq!(metainfo, env.load_metainfo(format!("{infohash}.torrent"))); } #[test] diff --git a/src/subcommand/torrent/stats.rs b/src/subcommand/torrent/stats.rs index 8510db0e..ce90e55a 100644 --- a/src/subcommand/torrent/stats.rs +++ b/src/subcommand/torrent/stats.rs @@ -158,9 +158,7 @@ impl Extractor { self.torrents += 1; - let contents = if let Ok(contents) = fs::read(path) { - contents - } else { + let Ok(contents) = fs::read(path) else { self.io_errors += 1; return; }; @@ -178,7 +176,7 @@ impl Extractor { fn extract(&mut self, value: &Value) { let matches = self.regex_set.matches(&self.current_path); - for i in matches.iter() { + for i in matches { let pattern = &self.regex_set.patterns()[i]; if let Some(values) = self.values.get_mut(pattern) { values.push(Self::pretty_print(value)); @@ -262,7 +260,7 @@ impl Extractor { } else { buffer.push('<'); for byte in string { - buffer.push_str(&format!("{:02X}", byte)); + buffer.push_str(&format!("{byte:02X}")); } buffer.push('>'); } diff --git a/src/subcommand/torrent/verify.rs b/src/subcommand/torrent/verify.rs index 4fb0cbcf..a18b5d51 100644 --- a/src/subcommand/torrent/verify.rs +++ b/src/subcommand/torrent/verify.rs @@ -326,7 +326,7 @@ mod tests { let bar = create_env.resolve("bar")?; - fs::rename(&foo, &bar).unwrap(); + fs::rename(foo, &bar).unwrap(); let mut verify_env = test_env! { args: [ @@ -445,7 +445,7 @@ mod tests { "--content", &content, ], - input: fs::read(&torrent).unwrap(), + input: fs::read(torrent).unwrap(), tree: {}, }; diff --git a/src/subcommand/torrent/verify/verify_step.rs b/src/subcommand/torrent/verify/verify_step.rs index 4e846ae0..2add3b38 100644 --- a/src/subcommand/torrent/verify/verify_step.rs +++ b/src/subcommand/torrent/verify/verify_step.rs @@ -27,7 +27,7 @@ impl<'a> Step for VerifyStep<'a> { fn write_message(&self, write: &mut dyn Write) -> io::Result<()> { match self { - Self::Loading { metainfo } => write!(write, "Loading metainfo from {}…", metainfo), + Self::Loading { metainfo } => write!(write, "Loading metainfo from {metainfo}…"), Self::Verifying { content } => { write!(write, "Verifying pieces from `{}`…", content.display()) } diff --git a/src/table.rs b/src/table.rs index 89cbeec6..fe379dd0 100644 --- a/src/table.rs +++ b/src/table.rs @@ -90,7 +90,7 @@ impl Table { } else { padding(out, name_width + 2)?; } - writeln!(out, "{}", value)?; + writeln!(out, "{value}")?; } } Value::Directory { root, files } => { @@ -122,11 +122,11 @@ impl Table { } } - writeln!(out, "{}", name)?; + writeln!(out, "{name}")?; } } - Value::Scalar(scalar) => writeln!(out, " {}", scalar)?, - Value::Size(bytes) => writeln!(out, " {}", bytes)?, + Value::Scalar(scalar) => writeln!(out, " {scalar}")?, + Value::Size(bytes) => writeln!(out, " {bytes}")?, Value::Tiers(tiers) => { let tier_name_width = tiers .iter() @@ -142,7 +142,7 @@ impl Table { write!( out, " {:width$}", - format!("{}:", name).as_str(), + format!("{name}:").as_str(), width = tier_name_width + 1 )?; @@ -151,7 +151,7 @@ impl Table { padding(out, name_width + 2 + tier_name_width + 1)?; } - writeln!(out, " {}", value)?; + writeln!(out, " {value}")?; } } } @@ -170,7 +170,7 @@ impl Table { if i > 0 { write!(out, "\t")?; } - write!(out, "{}", value)?; + write!(out, "{value}")?; } writeln!(out)?; } @@ -179,18 +179,18 @@ impl Table { if i > 0 { write!(out, "\t")?; } - write!(out, "{}/{}", root, file)?; + write!(out, "{root}/{file}")?; } writeln!(out)?; } - Value::Scalar(scalar) => writeln!(out, "{}", scalar)?, - Value::Size(Bytes(value)) => writeln!(out, "{}", value)?, + Value::Scalar(scalar) => writeln!(out, "{scalar}")?, + Value::Size(Bytes(value)) => writeln!(out, "{value}")?, Value::Tiers(tiers) => { for (i, value) in tiers.iter().flat_map(|(_name, values)| values).enumerate() { if i > 0 { write!(out, "\t")?; } - write!(out, "{}", value)?; + write!(out, "{value}")?; } writeln!(out)?; } @@ -273,22 +273,14 @@ mod tests { .write_human_readable(&mut cursor, Style::inactive()) .unwrap(); let have = String::from_utf8(cursor.into_inner()).unwrap(); - assert_eq!( - have, want, - "have != want:\nHAVE:\n{}\nWANT:\n{}", - have, want - ); + assert_eq!(have, want, "have != want:\nHAVE:\n{have}\nWANT:\n{want}",); } fn tab_delimited(table: &Table, want: &str) { let mut cursor = Cursor::new(Vec::new()); table.write_tab_delimited(&mut cursor).unwrap(); let have = String::from_utf8(cursor.into_inner()).unwrap(); - assert_eq!( - have, want, - "have != want:\nHAVE:\n{}\nWANT:\n{}", - have, want - ); + assert_eq!(have, want, "have != want:\nHAVE:\n{have}\nWANT:\n{want}",); } #[test] diff --git a/src/test_env.rs b/src/test_env.rs index f108df1b..854b6dbb 100644 --- a/src/test_env.rs +++ b/src/test_env.rs @@ -103,7 +103,7 @@ impl TestEnv { match self.run() { Ok(()) => {} Err(err) => { - eprintln!("Run failed: {}", err); + eprintln!("Run failed: {err}"); eprintln!("Std error:\n{}", self.err()); eprintln!("Std output:\n{}", self.out()); panic!(); diff --git a/src/torrent_summary.rs b/src/torrent_summary.rs index 90bcbf50..f5f48877 100644 --- a/src/torrent_summary.rs +++ b/src/torrent_summary.rs @@ -47,7 +47,7 @@ impl TorrentSummary { pub(crate) fn from_input(input: &Input) -> Result { let metainfo = Metainfo::from_input(input)?; let infohash = Infohash::from_input(input)?; - let size = Bytes(input.data().len().into_u64()); + let size = Bytes(input.data.len().into_u64()); Ok(Self::new(metainfo, infohash, size)) } @@ -82,13 +82,15 @@ impl TorrentSummary { #[allow(clippy::as_conversions)] table.row( "Creation Date", - Utc.timestamp( - creation_date - .min(i64::max_value() as u64) - .try_into() - .invariant_unwrap("min with i64 is always valid i64"), - 0, - ), + Utc + .timestamp_opt( + creation_date + .min(i64::max_value() as u64) + .try_into() + .invariant_unwrap("min with i64 is always valid i64"), + 0, + ) + .unwrap(), ); } diff --git a/src/tracker/client.rs b/src/tracker/client.rs index a3f52316..15f7c416 100644 --- a/src/tracker/client.rs +++ b/src/tracker/client.rs @@ -20,9 +20,8 @@ impl Client { .context(error::TrackerSocketAddrs)?; for tracker_addr in addrs { - let sock = match Self::new_udp_socket(tracker_addr) { - Ok(sock) => sock, - Err(_) => continue, // TODO: log these as warnings + let Ok(sock) = Self::new_udp_socket(tracker_addr) else { + continue; // TODO: log these as warnings }; let mut client = Client { peer_id: rand::thread_rng().gen(), @@ -77,9 +76,8 @@ impl Client { } pub fn announce_exchange(&self, btinh: &Infohash) -> Result> { - let connection_id = match self.connection_id { - Some(id) => id, - None => return Err(Error::TrackerNoConnectionId), + let Some(connection_id) = self.connection_id else { + return Err(Error::TrackerNoConnectionId); }; let local_addr = self diff --git a/src/xor_args.rs b/src/xor_args.rs index b773feb3..d97a51d4 100644 --- a/src/xor_args.rs +++ b/src/xor_args.rs @@ -8,8 +8,7 @@ pub(crate) fn xor_args( ) -> Result { let target = a.as_ref().xor(b.as_ref()).ok_or_else(|| { Error::internal(format!( - "Expected exactly one of the arguments `{}` or `{}` to be set", - a_name, b_name + "Expected exactly one of the arguments `{a_name}` or `{b_name}` to be set", )) })?;