From c5140a6156e91424e2ddfa74ce112a8e7d614949 Mon Sep 17 00:00:00 2001 From: Navid Date: Mon, 30 Oct 2023 01:04:23 +0330 Subject: [PATCH] update dependencies --- Cargo.lock | 243 ++++++++++++++++-------------------------- Cargo.toml | 10 +- tests/default_test.rs | 17 ++- tests/map_test.rs | 3 +- tests/regex_test.rs | 17 ++- tests/sort_test.rs | 3 +- 6 files changed, 114 insertions(+), 179 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 15d716d..7a70e1a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "aho-corasick" -version = "1.0.4" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] [[package]] name = "anstream" -version = "0.5.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", @@ -27,15 +27,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "2.1.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys", @@ -88,30 +88,21 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "bstr" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "c79ad7fb2dd38f3dabd76b09c6a5a20c038fc0213ef1e9afd30eb777f120f019" dependencies = [ "memchr", "regex-automata", "serde", ] -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - [[package]] name = "cfg-if" version = "1.0.0" @@ -120,20 +111,19 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "4.4.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d5f1946157a96594eb2d2c10eb7ad9a2b27518cb3000209dec700c35df9197d" +checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" dependencies = [ "clap_builder", "clap_derive", - "once_cell", ] [[package]] name = "clap_builder" -version = "4.4.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78116e32a042dd73c2901f0dc30790d20ff3447f3e3472fad359e8c3d282bcd6" +checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" dependencies = [ "anstream", "anstyle", @@ -143,9 +133,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.0" +version = "4.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" +checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck", "proc-macro2", @@ -155,9 +145,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" [[package]] name = "colorchoice" @@ -178,9 +168,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086" +checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" dependencies = [ "csv-core", "itoa", @@ -190,9 +180,9 @@ dependencies = [ [[package]] name = "csv-core" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" +checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" dependencies = [ "memchr", ] @@ -244,30 +234,19 @@ checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "errno" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" +name = "fastrand" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "getrandom" @@ -288,9 +267,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "is-terminal" @@ -305,9 +284,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.5" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ "either", ] @@ -326,21 +305,21 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "natord" @@ -350,7 +329,7 @@ checksum = "308d96db8debc727c3fd9744aac51751243420e46edf401010908da7f8d5e57c" [[package]] name = "nomino" -version = "1.3.2" +version = "1.3.3" dependencies = [ "anyhow", "assert_cmd", @@ -361,21 +340,15 @@ dependencies = [ "prettytable-rs", "regex", "serde_json", - "tempdir", + "tempfile", "walkdir", ] -[[package]] -name = "once_cell" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" - [[package]] name = "predicates" -version = "3.0.3" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" +checksum = "6dfc28575c2e3f19cb3c73b93af36460ae898d426eba6fc15b9bd2a5220758a0" dependencies = [ "anstyle", "difflib", @@ -415,9 +388,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -432,47 +405,19 @@ dependencies = [ ] [[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rdrand" -version = "0.4.0" +name = "redox_syscall" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ - "rand_core 0.3.1", + "bitflags 1.3.2", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ "bitflags 1.3.2", ] @@ -484,15 +429,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "regex" -version = "1.9.4" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12de2eff854e5fa4b1295edd650e227e9d8fb0c9e90b12e7f36d6a6811791a29" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", @@ -502,9 +447,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.7" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49530408a136e16e5b486e883fbb6ba058e8e4e8ae6621a77b048b314336e629" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -513,26 +458,17 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustix" -version = "0.38.9" +version = "0.38.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bfe0f2582b4931a45d1fa608f8a8722e8b3c7ac54dd6d5f3b3212791fedef49" +checksum = "2b426b0506e5d50a7d8dafcf2e81471400deb602392c7dd110815afb4eaf02a3" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", @@ -562,18 +498,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.188" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.190" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" dependencies = [ "proc-macro2", "quote", @@ -582,9 +518,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa", "ryu", @@ -599,9 +535,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" -version = "2.0.29" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -609,13 +545,16 @@ dependencies = [ ] [[package]] -name = "tempdir" -version = "0.3.7" +name = "tempfile" +version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8" +checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" dependencies = [ - "rand", - "remove_dir_all", + "cfg-if", + "fastrand", + "redox_syscall 0.4.1", + "rustix", + "windows-sys", ] [[package]] @@ -637,18 +576,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", @@ -657,15 +596,15 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-width" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "utf8parse" @@ -684,9 +623,9 @@ dependencies = [ [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -716,9 +655,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", ] diff --git a/Cargo.toml b/Cargo.toml index f3a6b22..e641254 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" name = "nomino" readme = "README.md" repository = "https://github.com/yaa110/nomino" -version = "1.3.2" +version = "1.3.3" [dependencies] anyhow = "1.0" @@ -17,13 +17,13 @@ colored = "2.0" is-terminal = "0.4" natord = "1.0" prettytable-rs = "0.10" -regex = "1.9" +regex = "1.10" serde_json = "1.0" -walkdir = "2.3" +walkdir = "2.4" [dev-dependencies] -assert_cmd = "2.0" -tempdir = "0.3" +assert_cmd = "2" +tempfile = "3" [profile.release] codegen-units = 1 diff --git a/tests/default_test.rs b/tests/default_test.rs index 88ed795..b7f84bd 100644 --- a/tests/default_test.rs +++ b/tests/default_test.rs @@ -3,12 +3,11 @@ use std::fs::create_dir_all; use std::fs::read_dir; use std::fs::File; use std::path::MAIN_SEPARATOR; -use tempdir::TempDir; #[cfg(not(target_os = "windows"))] #[test] fn test_default() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); let inputs = vec![ "Nomino (2020) S1.E1.1080p.mkv", @@ -52,7 +51,7 @@ fn test_default() { #[cfg(not(target_os = "windows"))] #[test] fn test_default_not_overwrite() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); let inputs = vec![ "Nomino (2020) S1.E1.1080p.mkv", @@ -91,7 +90,7 @@ fn test_default_not_overwrite() { #[cfg(not(target_os = "windows"))] #[test] fn test_default_overwrite() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); let inputs = vec![ "Nomino (2020) S1.E1.1080p.mkv", @@ -136,7 +135,7 @@ fn test_default_overwrite() { #[cfg(not(target_os = "windows"))] #[test] fn test_default_subdir() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); @@ -195,7 +194,7 @@ fn test_default_subdir() { #[cfg(not(target_os = "windows"))] #[test] fn test_default_subdir_depth() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); @@ -256,7 +255,7 @@ fn test_default_subdir_depth() { #[cfg(not(target_os = "windows"))] #[test] fn test_default_subdir_max_depth() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); @@ -319,7 +318,7 @@ fn test_default_subdir_max_depth() { #[cfg(not(target_os = "windows"))] #[test] fn test_default_subdir_not_overwrite() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); @@ -378,7 +377,7 @@ fn test_default_subdir_not_overwrite() { #[cfg(not(target_os = "windows"))] #[test] fn test_default_subdir_overwrite() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); diff --git a/tests/map_test.rs b/tests/map_test.rs index 013f571..03b4b47 100644 --- a/tests/map_test.rs +++ b/tests/map_test.rs @@ -2,12 +2,11 @@ use assert_cmd::Command; use std::fs::read_dir; use std::fs::File; use std::io::Write; -use tempdir::TempDir; #[cfg(not(target_os = "windows"))] #[test] fn test_map() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); let inputs = vec![ "Nomino (2020) S1.E1.1080p.mkv", diff --git a/tests/regex_test.rs b/tests/regex_test.rs index 3f3b78c..816f607 100644 --- a/tests/regex_test.rs +++ b/tests/regex_test.rs @@ -3,12 +3,11 @@ use std::fs::create_dir_all; use std::fs::read_dir; use std::fs::File; use std::path::MAIN_SEPARATOR; -use tempdir::TempDir; #[cfg(not(target_os = "windows"))] #[test] fn test_regex() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); let inputs = vec![ "Nomino (2020) S1.E1.1080p.mkv", @@ -53,7 +52,7 @@ fn test_regex() { #[cfg(not(target_os = "windows"))] #[test] fn test_regex_not_overwrite() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); let inputs = vec![ "Nomino (2020) S1.E1.1080p.mkv", @@ -98,7 +97,7 @@ fn test_regex_not_overwrite() { #[cfg(not(target_os = "windows"))] #[test] fn test_regex_overwrite() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); let inputs = vec![ "Nomino (2020) S1.E1.1080p.mkv", @@ -144,7 +143,7 @@ fn test_regex_overwrite() { #[cfg(not(target_os = "windows"))] #[test] fn test_regex_subdir() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); @@ -204,7 +203,7 @@ fn test_regex_subdir() { #[cfg(not(target_os = "windows"))] #[test] fn test_regex_subdir_depth() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); @@ -266,7 +265,7 @@ fn test_regex_subdir_depth() { #[cfg(not(target_os = "windows"))] #[test] fn test_regex_subdir_max_depth() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); @@ -330,7 +329,7 @@ fn test_regex_subdir_max_depth() { #[cfg(not(target_os = "windows"))] #[test] fn test_regex_subdir_not_overwrite() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); @@ -390,7 +389,7 @@ fn test_regex_subdir_not_overwrite() { #[cfg(not(target_os = "windows"))] #[test] fn test_regex_subdir_overwrite() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); create_dir_all(dir.path().join("s1")).unwrap(); create_dir_all(dir.path().join("s2")).unwrap(); diff --git a/tests/sort_test.rs b/tests/sort_test.rs index 936b3f9..352d7e7 100644 --- a/tests/sort_test.rs +++ b/tests/sort_test.rs @@ -1,12 +1,11 @@ use assert_cmd::Command; use std::fs::read_dir; use std::fs::File; -use tempdir::TempDir; #[cfg(not(target_os = "windows"))] #[test] fn test_sort() { - let dir = TempDir::new("nomino_test").unwrap(); + let dir = tempfile::tempdir().unwrap(); let inputs = vec![ "Nomino (2020) S1.E1.1080p.mkv",