diff --git a/Cargo.lock b/Cargo.lock index 271ed02f551f6d1a91012127d0c7d1047cb7f0a1..f50e278e6caeb33261daf4ad41be4fc2729032fd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -25,9 +25,9 @@ dependencies = [ [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ "winapi", ] @@ -45,9 +45,15 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" + +[[package]] +name = "bit_field" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "dcb6dd1c2376d2e096796e234a70e17e94cc2d5d54ff8ce42b28cef1d0d359a4" [[package]] name = "bitflags" @@ -57,36 +63,24 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "block-buffer" -version = "0.7.3" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324" dependencies = [ - "block-padding", - "byte-tools", - "byteorder", "generic-array", ] [[package]] -name = "block-padding" -version = "0.1.5" +name = "bumpalo" +version = "3.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" [[package]] name = "bytemuck" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72957246c41db82b8ef88a5486143830adeb8227ef9837740bdec67724cf2c5b" +checksum = "0e851ca7c24871e7336801608a4797d7376545b6928a10d32d75685687141ead" [[package]] name = "byteorder" @@ -96,9 +90,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "cc" -version = "1.0.70" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -106,32 +100,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "time", - "winapi", -] - [[package]] name = "clap" -version = "2.33.3" +version = "3.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123" dependencies = [ - "ansi_term", "atty", "bitflags", + "indexmap", + "os_str_bytes", "strsim", + "termcolor", "textwrap", - "unicode-width", - "vec_map", ] [[package]] @@ -140,20 +121,29 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" +[[package]] +name = "cpufeatures" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" dependencies = [ "cfg-if", "crossbeam-utils", @@ -172,9 +162,9 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" +checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9" dependencies = [ "cfg-if", "crossbeam-utils", @@ -185,31 +175,41 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" dependencies = [ "cfg-if", "lazy_static", ] +[[package]] +name = "crypto-common" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57952ca27b5e3606ff4dd79b0020231aaf9d6aa76dc05fd30137538c50bd3ce8" +dependencies = [ + "generic-array", + "typenum", +] + [[package]] name = "deflate" -version = "0.8.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73770f8e1fe7d64df17ca66ad28994a0a623ea497fa69486e14984e715c5d174" +checksum = "c86f7e25f518f4b81808a2cf1c50996a61f5c2eb394b2393bd87f2a4780a432f" dependencies = [ "adler32", - "byteorder", ] [[package]] name = "digest" -version = "0.8.1" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" dependencies = [ - "generic-array", + "block-buffer", + "crypto-common", ] [[package]] @@ -219,52 +219,112 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] -name = "fake-simd" -version = "0.1.2" +name = "exr" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4badb9489a465cb2c555af1f00f0bfd8cecd6fc12ac11da9d5b40c5dd5f0200" +dependencies = [ + "bit_field", + "deflate", + "flume", + "half", + "inflate", + "lebe", + "smallvec", + "threadpool", +] + +[[package]] +name = "fastrand" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +dependencies = [ + "instant", +] + +[[package]] +name = "flate2" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" +checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +dependencies = [ + "cfg-if", + "crc32fast", + "libc", + "miniz_oxide 0.4.4", +] [[package]] name = "flexi_logger" -version = "0.15.12" +version = "0.22.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaab3caedb4149800f91e8e4899f29cd9ddf3b569b04c365ca9334f92f7542bf" +checksum = "969940c39bc718475391e53a3a59b0157e64929c80cf83ad5dde5f770ecdc423" dependencies = [ + "ansi_term", "atty", - "chrono", "glob", "lazy_static", "log", "regex", + "rustversion", "thiserror", - "yansi", + "time", +] + +[[package]] +name = "flume" +version = "0.10.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843c03199d0c0ca54bc1ea90ac0d507274c28abcc4f691ae8b4eaa375087c76a" +dependencies = [ + "futures-core", + "futures-sink", + "nanorand", + "pin-project", + "spin", ] +[[package]] +name = "futures-core" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c09fd04b7e4073ac7156a9539b57a484a8ea920f79c7c675d05d289ab6110d3" + +[[package]] +name = "futures-sink" +version = "0.3.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21163e139fa306126e6eedaf49ecdb4588f939600f0b1e770f4205ee4b7fa868" + [[package]] name = "generic-array" -version = "0.12.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" +checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" dependencies = [ "typenum", + "version_check", ] [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] name = "gif" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a668f699973d0f573d15749b7002a9ac9e1f9c6b220e7b165601334c173d8de" +checksum = "c3a7187e78088aead22ceedeee99779455b23fc231fe13ec443f99bb71694e5b" dependencies = [ "color_quant", "weezl", @@ -276,6 +336,18 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +[[package]] +name = "half" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7" + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -287,15 +359,16 @@ dependencies = [ [[package]] name = "image" -version = "0.23.14" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ffcb7e7244a9bf19d35bf2883b9c080c4ced3c07a9895572178cdb8f13f6a1" +checksum = "db207d030ae38f1eb6f240d5a1c1c88ff422aa005d10f8c6c6fc5e75286ab30e" dependencies = [ "bytemuck", "byteorder", "color_quant", + "exr", "gif", - "jpeg-decoder", + "jpeg-decoder 0.2.2", "num-iter", "num-rational", "num-traits", @@ -304,47 +377,96 @@ dependencies = [ "tiff", ] +[[package]] +name = "indexmap" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" +dependencies = [ + "autocfg", + "hashbrown", +] + +[[package]] +name = "inflate" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" +dependencies = [ + "adler32", +] + +[[package]] +name = "instant" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +dependencies = [ + "cfg-if", +] + [[package]] name = "itertools" -version = "0.9.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b" +checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" dependencies = [ "either", ] [[package]] name = "itoa" -version = "0.4.8" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] name = "jpeg-decoder" version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" + +[[package]] +name = "jpeg-decoder" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "105fb082d64e2100074587f59a74231f771750c664af903f1f9f76c9dedfc6f1" dependencies = [ "rayon", ] +[[package]] +name = "js-sys" +version = "0.3.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" +dependencies = [ + "wasm-bindgen", +] + [[package]] name = "lazy_static" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +[[package]] +name = "lebe" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7efd1d698db0759e6ef11a7cd44407407399a910c774dd804c64c032da7826ff" + [[package]] name = "libc" -version = "0.2.102" +version = "0.2.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a5ac8f984bfcf3a823267e5fde638acc3325f6496633a5da6bb6eb2171e103" +checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" [[package]] name = "libz-sys" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" +checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859" dependencies = [ "cc", "libc", @@ -352,6 +474,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "lock_api" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" +dependencies = [ + "scopeguard", +] + [[package]] name = "log" version = "0.4.14" @@ -363,9 +494,9 @@ dependencies = [ [[package]] name = "matrixmultiply" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a8a15b776d9dfaecd44b03c5828c2199cddff5247215858aac14624f8d6b741" +checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" dependencies = [ "rawpointer", ] @@ -378,37 +509,46 @@ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "memoffset" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] [[package]] name = "miniz_oxide" -version = "0.3.7" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ - "adler32", + "adler", + "autocfg", ] [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "d2b29bd4bc3f33391105ebee3589c19197c4271e3e5a9ec9bfe8127eeff8f082" dependencies = [ "adler", - "autocfg", +] + +[[package]] +name = "nanorand" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" +dependencies = [ + "getrandom", ] [[package]] name = "ndarray" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08e854964160a323e65baa19a0b1a027f76d590faba01f05c0cbc3187221a8c9" +checksum = "dec23e6762830658d2b3d385a75aa212af2f67a4586d4442907144f3bb6a1ca8" dependencies = [ "matrixmultiply", "num-complex", @@ -449,9 +589,9 @@ dependencies = [ [[package]] name = "num-rational" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07" +checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ "autocfg", "num-integer", @@ -469,19 +609,22 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", ] [[package]] -name = "opaque-debug" -version = "0.2.3" +name = "num_threads" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +checksum = "97ba99ba6393e2c3734791401b66902d981cb03bf190af674ca69949b6d5fb15" +dependencies = [ + "libc", +] [[package]] name = "opus_headers" @@ -490,85 +633,68 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "afbb993947f111397c2bc536944f8dac7f54a4e73383d478efe1990b56404b60" [[package]] -name = "pkg-config" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" - -[[package]] -name = "png" -version = "0.16.8" +name = "os_str_bytes" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3287920cb847dee3de33d301c463fba14dda99db24214ddf93f83d3021f4c6" +checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64" dependencies = [ - "bitflags", - "crc32fast", - "deflate", - "miniz_oxide 0.3.7", + "memchr", ] [[package]] -name = "ppv-lite86" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" - -[[package]] -name = "proc-macro2" -version = "1.0.29" +name = "pin-project" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" +checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" dependencies = [ - "unicode-xid", + "pin-project-internal", ] [[package]] -name = "quote" -version = "1.0.9" +name = "pin-project-internal" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" dependencies = [ "proc-macro2", + "quote", + "syn", ] [[package]] -name = "rand" -version = "0.8.4" +name = "pkg-config" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", - "rand_hc", -] +checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "png" +version = "0.17.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "dc38c0ad57efb786dd57b9864e5b18bae478c00c824dc55a38bbc9da95dde3ba" dependencies = [ - "ppv-lite86", - "rand_core", + "bitflags", + "crc32fast", + "deflate", + "miniz_oxide 0.5.1", ] [[package]] -name = "rand_core" -version = "0.6.3" +name = "proc-macro2" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" +checksum = "c7342d5883fbccae1cc37a2353b09c87c9b0f3afd73f5fb9bba687a1f733b029" dependencies = [ - "getrandom", + "unicode-xid", ] [[package]] -name = "rand_hc" -version = "0.3.1" +name = "quote" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" +checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" dependencies = [ - "rand_core", + "proc-macro2", ] [[package]] @@ -604,18 +730,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" dependencies = [ "aho-corasick", "memchr", @@ -637,17 +763,23 @@ dependencies = [ "winapi", ] +[[package]] +name = "rustversion" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" + [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" [[package]] name = "sanitize-filename" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23fd0fec94ec480abfd86bb8f4f6c57e0efb36dac5c852add176ea7b04c74801" +checksum = "bf18934a12018228c5b55a6dae9df5d0641e3566b3630cb46cc55564068e7c2f" dependencies = [ "lazy_static", "regex", @@ -667,18 +799,18 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" -version = "1.0.130" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2", "quote", @@ -687,9 +819,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.68" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" +checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" dependencies = [ "itoa", "ryu", @@ -698,21 +830,35 @@ dependencies = [ [[package]] name = "sha2" -version = "0.8.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a256f46ea78a0c0d9ff00077504903ac881a1dafdc20da66545699e7776b3e69" +checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676" dependencies = [ - "block-buffer", + "cfg-if", + "cpufeatures", "digest", - "fake-simd", - "opaque-debug", +] + +[[package]] +name = "smallvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" + +[[package]] +name = "spin" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "511254be0c5bcf062b019a6c89c01a664aa359ded62f78aa72c6fc137c0590e5" +dependencies = [ + "lock_api", ] [[package]] name = "strsim" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structview" @@ -737,9 +883,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.76" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" +checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" dependencies = [ "proc-macro2", "quote", @@ -748,68 +894,91 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if", + "fastrand", "libc", - "rand", "redox_syscall", "remove_dir_all", "winapi", ] [[package]] -name = "textwrap" -version = "0.11.0" +name = "termcolor" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ - "unicode-width", + "winapi-util", ] +[[package]] +name = "textwrap" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" + [[package]] name = "thiserror" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2", "quote", "syn", ] +[[package]] +name = "threadpool" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" +dependencies = [ + "num_cpus", +] + [[package]] name = "tiff" -version = "0.6.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a53f4706d65497df0c4349241deddf35f84cee19c87ed86ea8ca590f4464437" +checksum = "0247608e998cb6ce39dfc8f4a16c50361ce71e5b52e6d24ea1227ea8ea8ee0b2" dependencies = [ - "jpeg-decoder", - "miniz_oxide 0.4.4", + "flate2", + "jpeg-decoder 0.1.22", "weezl", ] [[package]] name = "time" -version = "0.1.43" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" dependencies = [ + "itoa", "libc", - "winapi", + "num_threads", + "time-macros", ] +[[package]] +name = "time-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25eb0ca3468fc0acc11828786797f6ef9aa1555e4a211a60d64cc8e4d1be47d6" + [[package]] name = "twmap" version = "0.6.0" @@ -835,15 +1004,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" - -[[package]] -name = "unicode-width" -version = "0.1.8" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" [[package]] name = "unicode-xid" @@ -858,10 +1021,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] -name = "vec_map" -version = "0.8.2" +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wasi" @@ -869,6 +1032,60 @@ version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +[[package]] +name = "wasm-bindgen" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" +dependencies = [ + "bumpalo", + "lazy_static", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.79" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" + [[package]] name = "weezl" version = "0.1.5" @@ -892,13 +1109,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "winapi-util" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +dependencies = [ + "winapi", +] [[package]] -name = "yansi" -version = "0.5.0" +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/Cargo.toml b/Cargo.toml index 0c760e8454cc58ba0fdc12f0f761acebd56b0ed6..0165a6c1c524cb53def791ea3de6d964249fe992 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,20 +12,20 @@ keywords = ["teeworlds", "ddnet"] overflow-checks = true [dependencies] -bitflags = "1.2.1" -clap = "2.33.1" -flexi_logger = "0.15.4" -image = "0.23.12" -itertools = "0.9.0" -libc = "0.2.79" -libz-sys = "1.1.2" -log = "0.4.8" -ndarray = "0.15.3" +bitflags = "1.3.2" +clap = "3.1.6" +flexi_logger = "0.22.3" +image = "0.24.1" +itertools = "0.10.3" +libc = "0.2.119" +libz-sys = "1.1.5" +log = "0.4.14" +ndarray = "0.15.4" opus_headers = "0.1.2" -sanitize-filename = "0.2.1" -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0.59" -sha2 = "0.8.1" +sanitize-filename = "0.3.0" +serde = { version = "1.0.136", features = ["derive"] } +serde_json = "1.0.79" +sha2 = "0.10.2" structview = "1.1.0" -tempfile = "3.1.0" -thiserror = "1.0" +tempfile = "3.3.0" +thiserror = "1.0.30" diff --git a/src/bin/check_ddnet.rs b/src/bin/check_ddnet.rs index e6bb97c599fd1041cf5164c8ee536486d616d843..52032eab20a5ea8bf942a3ac10f995e1346074a8 100644 --- a/src/bin/check_ddnet.rs +++ b/src/bin/check_ddnet.rs @@ -1,7 +1,7 @@ use twmap::map_checks::MapError; use twmap::*; -use clap::{App, Arg}; +use clap::{Command, Arg}; use std::collections::HashMap; use std::ffi::OsString; @@ -142,24 +142,24 @@ fn sensitive_id(id: u8) -> &'static str { } fn main() { - let matches = App::new("twmap check_ddnet") + let matches = Command::new("twmap check_ddnet") .author("Patiga ") .about("Scans ddnet maps for faulty behavior (e.g. falsely placed hook-through, invalid rotation of game tiles)") - .arg(Arg::with_name("files") + .arg(Arg::new("files") .required(true) .min_values(1) .index(1)) - .arg(Arg::with_name("hookthrough") + .arg(Arg::new("hookthrough") .help("Check for faulty hookthrough: combo ht with no solid block underneath") .long("hookthrough")) - .arg(Arg::with_name("directional-blocks") + .arg(Arg::new("directional-blocks") .help("Check for direction sensitive blocks in the physics layer which have an invalid orientation") .long("directional-blocks")) - .arg(Arg::with_name("no-file-paths") + .arg(Arg::new("no-file-paths") .long("no-file-paths") - .short("f") + .short('f') .help("Omit the file path at the start of each error info line")) - .arg(Arg::with_name("no-summary") + .arg(Arg::new("no-summary") .long("no-summary") .help("Omit the short summary at the end")) .get_matches(); diff --git a/src/bin/debug_load.rs b/src/bin/debug_load.rs index e21df0b6d5a4a71b7a2e9ce6c439a24378f9193d..c11f104404472662691e0820e2545c609db2dc93 100644 --- a/src/bin/debug_load.rs +++ b/src/bin/debug_load.rs @@ -4,8 +4,8 @@ use twmap::map_dir::{MapDirError, MapDirErrorKind}; use twmap::map_parse::MapFromDatafileError; use twmap::{Error, LoadMultiple, TwMap, Version}; -use clap::{App, Arg, ArgGroup}; -use flexi_logger::{DeferredNow, LogTarget, Logger, Record}; +use clap::{Arg, ArgGroup, Command}; +use flexi_logger::{DeferredNow, Logger, Record}; use std::ffi::{OsStr, OsString}; use std::fmt; @@ -134,39 +134,39 @@ fn from_index(index: usize) -> &'static str { } fn main() { - let matches = App::new("twmap debug_load") + let matches = Command::new("twmap debug_load") .author("Patiga ") .about("Tries to parse various parts of teeworlds map files according to the passed arguments") - .arg(Arg::with_name("files") + .arg(Arg::new("files") .required(true) .min_values(1) .index(1)) - .arg(Arg::with_name("verbose") - .short("v") - .multiple(true) + .arg(Arg::new("verbose") + .short('v') + .multiple_occurrences(true) .help("Level of verbosity: -v => errors, -vv => also warn logs, -vvv => also info logs")) - .arg(Arg::with_name("datafile-only") + .arg(Arg::new("datafile-only") .help("Only parse the datafile, not the map") .long("datafile-only")) - .arg(Arg::with_name("no-checks") + .arg(Arg::new("no-checks") .help("Only parse the TwMap struct, omit further checks") .long("no-checks")) - .arg(Arg::with_name("keep-compressed") + .arg(Arg::new("keep-compressed") .long("keep-compressed") .help("Don't decompress loadable data items. If this is not set, they will be loaded if no other errors were found")) - .group(ArgGroup::with_name("parsing-options") + .group(ArgGroup::new("parsing-options") .args(&["datafile-only", "no-checks", "keep-compressed"])) - .arg(Arg::with_name("no-summary") + .arg(Arg::new("no-summary") .long("no-summary") .help("Omit the short summary of encountered errors at the end")) - .arg(Arg::with_name("full-summary") + .arg(Arg::new("full-summary") .long("full-summary") .help("Don't emit the summary entries with 0 findings")) - .group(ArgGroup::with_name("summary-options") + .group(ArgGroup::new("summary-options") .args(&["no-summary", "full-summary"])) - .arg(Arg::with_name("no-file-paths") + .arg(Arg::new("no-file-paths") .long("no-file-paths") - .short("f") + .short('f') .help("Omit the file path at the start of each error info line")) .get_matches(); @@ -183,14 +183,16 @@ fn main() { let verbosity = matches.occurrences_of("verbose"); let verbose = verbosity > 0; if verbosity == 2 { - Logger::with_str("warn") - .log_target(LogTarget::StdOut) + Logger::try_with_str("warn") + .unwrap() + .log_to_stdout() .format(log_format) .start() .unwrap(); } else if verbosity >= 3 { - Logger::with_str("info") - .log_target(LogTarget::StdOut) + Logger::try_with_str("info") + .unwrap() + .log_to_stdout() .format(log_format) .start() .unwrap(); diff --git a/src/bin/edit_map.rs b/src/bin/edit_map.rs index 8ff5389cbe66a65d3e5f11249594aea7b5142459..6de8a307400e452952248df11c551f0a5bde0667 100644 --- a/src/bin/edit_map.rs +++ b/src/bin/edit_map.rs @@ -1,66 +1,66 @@ use twmap::TwMap; -use clap::{App, Arg}; +use clap::{Command, Arg}; use std::path::PathBuf; use std::process::exit; fn main() { - let matches = App::new("twmap edit_map") + let matches = Command::new("twmap edit_map") .author("Patiga ") .about("Loads teeworlds/ddnet maps, applies changes configured through the arguments, saves them again.") - .arg(Arg::with_name("INPUT-FILE") + .arg(Arg::new("INPUT-FILE") .help("Sets input map file path") .required(true) .index(1)) - .arg(Arg::with_name("OUTPUT-FILE") + .arg(Arg::new("OUTPUT-FILE") .help("Sets output file path") .required(true) .index(2)) - .arg(Arg::with_name("MapDir") + .arg(Arg::new("MapDir") .help("Save as a directory map.") .long("mapdir")) - .arg(Arg::with_name("isolate-physics-layers") + .arg(Arg::new("isolate-physics-layers") .long("isolate-physics-layers") .help("Moves cosmetic layers out of the physics group into separate ones, keeping the render order")) - .arg(Arg::with_name("mirror") + .arg(Arg::new("mirror") .long("mirror") - .short("m") + .short('m') .help("Mirror the map (switches left and right), applies before rotating")) - .arg(Arg::with_name("rotate-right") + .arg(Arg::new("rotate-right") .long("rotate") - .short("r") + .short('r') .help("Rotate the map clockwise, this flag can be used multiple times") - .multiple(true)) - .arg(Arg::with_name("remove-everything-unused") + .multiple_occurrences(true)) + .arg(Arg::new("remove-everything-unused") .long("remove-everything-unused") .help("Removes all unused layers, groups, envelopes, images and sounds")) - .arg(Arg::with_name("remove-unused-envelopes") + .arg(Arg::new("remove-unused-envelopes") .long("remove-unused-envelopes") .help("Removes all unused envelopes")) - .arg(Arg::with_name("remove-unused-files") + .arg(Arg::new("remove-unused-files") .long("remove-unused-files") .help("Removes all unused images and sounds")) - .arg(Arg::with_name("extend-up") + .arg(Arg::new("extend-up") .takes_value(true) .long("extend-up") .help("Extends all layers upwards by the specified tile amount")) - .arg(Arg::with_name("extend-left") + .arg(Arg::new("extend-left") .takes_value(true) .long("extend-left") .help("Extends all layers left by the specified tile amount")) - .arg(Arg::with_name("extend-down") + .arg(Arg::new("extend-down") .takes_value(true) .long("extend-down") .help("Extends all layers down by the specified tile amount")) - .arg(Arg::with_name("extend-right") + .arg(Arg::new("extend-right") .takes_value(true) .long("extend-right") .help("Extends all layers right by the specified tile amount")) - .arg(Arg::with_name("shrink-layers") + .arg(Arg::new("shrink-layers") .long("shrink-layers") .help("Shrinks all layers as much as possible without changing anything. Note that this might move the world border")) - .arg(Arg::with_name("shrink-tiles-layers") + .arg(Arg::new("shrink-tiles-layers") .long("shrink-tiles-layers") .help("Shrinks all tiles layers as much as possible without changing anything.")) .get_matches(); diff --git a/src/bin/extract_files.rs b/src/bin/extract_files.rs index c2c5158d21534ea7cc0738d464f2fdd81135688a..9921441d236821a60e4d75f0503a9b0b56c4fcf5 100644 --- a/src/bin/extract_files.rs +++ b/src/bin/extract_files.rs @@ -1,6 +1,6 @@ use twmap::{Image, LoadMultiple, Sound, TwMap}; -use clap::{App, Arg, ArgGroup}; +use clap::{Arg, ArgGroup, Command}; use sha2::{Digest, Sha256}; use std::error::Error; @@ -9,26 +9,26 @@ use std::fs; use std::io::Write; fn main() { - let matches = App::new("twmap extract_files") + let matches = Command::new("twmap extract_files") .author("Patiga ") .about("Extracts images and sounds from teeworlds maps. Saves them to the current working directory.") - .arg(Arg::with_name("files") + .arg(Arg::new("files") .required(true) .min_values(1) .index(1)) - .arg(Arg::with_name("images-only") + .arg(Arg::new("images-only") .long("images") - .short("i") + .short('i') .help("Only extract image files (.png)")) - .arg(Arg::with_name("sounds-only") + .arg(Arg::new("sounds-only") .long("sounds") - .short("s") + .short('s') .help("Only extract sound files (.opus)")) - .group(ArgGroup::with_name("specify") + .group(ArgGroup::new("specify") .args(&["images-only", "sounds-only"])) - .arg(Arg::with_name("omit-hash") + .arg(Arg::new("omit-hash") .long("omit-hash") - .short("x") + .short('x') .help("Omit sha256 postfix -> allow collisions in file names")) .get_matches(); @@ -102,11 +102,7 @@ fn save_sounds(mut sounds: Vec, shorten: bool) -> Result<(), Box String { let mut hasher = Sha256::new(); - hasher.input(data); - hasher - .result() - .iter() - .map(|byte| format!("{:02x}", byte)) - .collect::>() - .join("") -} + hasher.update(data); + let result = hasher.finalize(); + format!("{:x}", result) +} \ No newline at end of file diff --git a/src/bin/extract_tileflags.rs b/src/bin/extract_tileflags.rs index c4c24ad340a5f820525cb64564523922a5e5b36c..e61921ff05d96f71bafb3a44d93fbb0a13943f6b 100644 --- a/src/bin/extract_tileflags.rs +++ b/src/bin/extract_tileflags.rs @@ -1,17 +1,17 @@ use itertools::Itertools; use twmap::map_edit::calc_opaque_table; -use clap::{App, Arg}; +use clap::{Command, Arg}; use image::io::Reader as ImageReader; use std::path::{Path, PathBuf}; use std::process::exit; fn main() { - let matches = App::new("twmap extract_tileflags") + let matches = Command::new("twmap extract_tileflags") .author("Patiga ") .about("Extracts the TILEFLAG_OPAQUE table for a image. TILEFLAG_OPAQUE is used for saving maps, opaque tiles in tiles layers are marked.") - .arg(Arg::with_name("image") + .arg(Arg::new("image") .help("Path to the image") .required(true) .index(1)) diff --git a/src/bin/fix_map.rs b/src/bin/fix_map.rs index 0e6dad62aa0ebadb9e00fc75927e50dcd4666cec..6c56bed593402bdbaa63c11c224424764fe00537 100644 --- a/src/bin/fix_map.rs +++ b/src/bin/fix_map.rs @@ -2,31 +2,31 @@ use twmap::datafile_parse::RawDatafile; use twmap::map_checks::envelope_kinds; use twmap::{Layer, TwMap}; -use clap::{App, Arg}; +use clap::{Command, Arg}; use std::fs; use std::path::PathBuf; use std::process::exit; fn main() { - let matches = App::new("twmap fix_map") + let matches = Command::new("twmap fix_map") .author("Patiga ") .about("Loads broken binary teeworlds/ddnet maps, applies fixes configured through the arguments, tries to save them again.") - .arg(Arg::with_name("INPUT-FILE") + .arg(Arg::new("INPUT-FILE") .help("Sets input map file path") .required(true) .index(1)) - .arg(Arg::with_name("OUTPUT-FILE") + .arg(Arg::new("OUTPUT-FILE") .help("Sets output file path") .required(true) .index(2)) - .arg(Arg::with_name("remove-faulty-quads") + .arg(Arg::new("remove-faulty-quads") .long("remove-faulty-quads") .help("Goes through all quads and removes faulty ones")) - .arg(Arg::with_name("zero-unused-tile-parts") + .arg(Arg::new("zero-unused-tile-parts") .long("zero-unused-tile-parts") .help("Zero the parts of tiles that are unused and can't be edited with the common tools")) - .arg(Arg::with_name("remove-all-envelopes") + .arg(Arg::new("remove-all-envelopes") .long("remove-all-envelopes") .help("Remove all envelope items before parsing the map from the datafile")) .get_matches();