diff --git a/Cargo.lock b/Cargo.lock index 6295712..b1e5eb6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,10 +19,11 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.7.6" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "57e6e951cfbb2db8de1828d49073a113a29fd7117b1596caa781a258c7e38d72" dependencies = [ + "cfg-if", "getrandom", "once_cell", "version_check", @@ -39,9 +40,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91f1f46651137be86f3a2b9a8359f9ab421d04d941c62b5982e1ca21113adf9" +checksum = "a26fa4d7e3f2eebadf743988fc8aec9fa9a9e82611acafd77c1462ed6262440a" [[package]] name = "assert_fs" @@ -109,9 +110,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.10.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ccbd214614c6783386c1af30caf03192f17891059cecc394b4fb119e363de3" +checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" [[package]] name = "bytes" @@ -150,9 +151,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.16" +version = "3.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3dbbb6653e7c55cc8595ad3e1f7be8f32aba4eb7ff7f0fd1163d4f3d137c0a9" +checksum = "68d43934757334b5c0519ff882e1ab9647ac0258b47c24c4f490d78e42697fd5" dependencies = [ "atty", "bitflags", @@ -171,15 +172,15 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0636f9c040082f8e161555a305f8cec1a1c2828b3d981c812b8c39f4ac00c42c" dependencies = [ - "clap 3.2.16", + "clap 3.2.19", "log", ] [[package]] name = "clap_derive" -version = "3.2.15" +version = "3.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba52acd3b0a5c33aeada5cdaa3267cdc7c594a98731d4268cdc1532f4264cb4" +checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65" dependencies = [ "heck", "proc-macro-error", @@ -203,7 +204,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7ecb55fae620b95dc3586f10bf6d93d4bfc73b34b0adddf18445b9291458dd6" dependencies = [ - "clap 3.2.16", + "clap 3.2.19", "derive_more", "difference", "normalize-line-endings", @@ -222,9 +223,9 @@ dependencies = [ [[package]] name = "combine" -version = "4.6.4" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a604e93b79d1808327a6fca85a6f2d69de66461e7620f5a4cbf5fb4d1d7c948" +checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" dependencies = [ "bytes", "memchr", @@ -247,7 +248,7 @@ version = "0.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b35b55e880d42d4626e6a1aa5b4e63a4df61cf024472a31495ecbbb712402985" dependencies = [ - "clap 3.2.16", + "clap 3.2.19", "concolor", ] @@ -477,9 +478,9 @@ checksum = "bbbaaaf38131deb9ca518a274a45bfdb8771f139517b073b16c2d3d32ae5037b" [[package]] name = "either" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "encoding" @@ -798,9 +799,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.126" +version = "0.2.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5" [[package]] name = "log" @@ -905,9 +906,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a6dbe30758c9f83eb00cbea4ac95966305f5a7772f3f42ebfc7fc7eddbd8e1" +checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e" [[package]] name = "oorandom" @@ -927,9 +928,9 @@ dependencies = [ [[package]] name = "os_str_bytes" -version = "6.2.0" +version = "6.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "648001efe5d5c0102d8cea768e348da85d90af8ba91f0bea908f157951493cd4" +checksum = "9ff7415e9ae3fff1225851df9e0d9e4e5479f947619774677a63572e55e80eff" [[package]] name = "os_type" @@ -942,9 +943,9 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4724fa946c8d1e7cd881bd3dbee63ce32fc1e9e191e35786b3dc1320a3f68131" +checksum = "928c6535de93548188ef63bb7c4036bd415cd8f36ad25af44b9789b2ee72a48c" dependencies = [ "phf_macros", "phf_shared", @@ -952,9 +953,9 @@ dependencies = [ [[package]] name = "phf_codegen" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ba0c43d7a1b6492b2924a62290cfd83987828af037b0743b38e6ab092aee58" +checksum = "a56ac890c5e3ca598bbdeaa99964edb5b0258a583a9eb6ef4e89fc85d9224770" dependencies = [ "phf_generator", "phf_shared", @@ -962,9 +963,9 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b450720b6f75cfbfabc195814bd3765f337a4f9a83186f8537297cac12f6705" +checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" dependencies = [ "phf_shared", "rand", @@ -972,9 +973,9 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd94351ac44e70e56b59883e15029a5135f902a8a3020f9c18d580a420e526aa" +checksum = "92aacdc5f16768709a569e913f7451034034178b05bdc8acda226659a3dccc66" dependencies = [ "phf_generator", "phf_shared", @@ -986,9 +987,9 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd5609d4b2df87167f908a32e1b146ce309c16cf35df76bc11f440b756048e4" +checksum = "e1fb5f6f826b772a8d4c0394209441e7d37cbbb967ae9c7e0e8134365c9ee676" dependencies = [ "siphasher", "unicase", @@ -996,9 +997,9 @@ dependencies = [ [[package]] name = "plotters" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9428003b84df1496fb9d6eeee9c5f8145cb41ca375eb0dad204328888832811f" +checksum = "716b4eeb6c4a1d3ecc956f75b43ec2e8e8ba80026413e70a3f41fd3313d3492b" dependencies = [ "num-traits", "plotters-backend", @@ -1015,19 +1016,13 @@ checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142" [[package]] name = "plotters-svg" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0918736323d1baff32ee0eade54984f6f201ad7e97d5cfb5d6ab4a358529615" +checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f" dependencies = [ "plotters-backend", ] -[[package]] -name = "ppv-lite86" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" - [[package]] name = "predicates" version = "2.1.1" @@ -1109,18 +1104,6 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", "rand_core", ] @@ -1129,9 +1112,6 @@ name = "rand_core" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom", -] [[package]] name = "rayon" @@ -1242,9 +1222,9 @@ checksum = "93f6841e709003d68bb2deee8c343572bf446003ec20a583e76f7b15cebf3711" [[package]] name = "serde" -version = "1.0.142" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e590c437916fb6b221e1d00df6e3294f3fccd70ca7e92541c475d6ed6ef5fee2" +checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" dependencies = [ "serde_derive", ] @@ -1261,9 +1241,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.142" +version = "1.0.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b5b8d809babe02f538c2cfec6f2c1ed10804c0e5a6a041a049a4f5588ccc2e" +checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" dependencies = [ "proc-macro2", "quote", @@ -1272,9 +1252,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.83" +version = "1.0.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38dd04e3c8279e75b31ef29dbdceebfe5ad89f4d0937213c53f7d49d01b3d5a7" +checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44" dependencies = [ "itoa 1.0.3", "ryu", @@ -1307,9 +1287,9 @@ checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "snapbox" -version = "0.3.1" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc9f6603988128836d0ed032a28fac5fb049958e21578e9aed2ed05f69bb562a" +checksum = "44d199ccf8f606592df2d145db26f2aa45344e23c64b074cc5a4047f1d99b0f7" dependencies = [ "concolor", "content_inspector", @@ -1406,18 +1386,18 @@ checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" [[package]] name = "thiserror" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f6586b7f764adc0231f4c79be7b920e766bb2f3e51b3661cdb263828f19994" +checksum = "3d0a539a918745651435ac7db7a18761589a94cd7e94cd56999f828bf73c8a57" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12bafc5b54507e0149cdf1b145a5d80ab80a90bcd9275df43d4fff68460f6c21" +checksum = "c251e90f708e16c49a16f4917dc2131e75222b72edfa9cb7f7c58ae56aae0c09" dependencies = [ "proc-macro2", "quote", @@ -1466,9 +1446,9 @@ dependencies = [ [[package]] name = "trycmd" -version = "0.13.5" +version = "0.13.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62a09d4fff814904dc04bf60dc19fd7ed41715e3e00dd423eb1c5636a942e2a4" +checksum = "9ac9fa73959e252e7c5a4e6260544b952f5bf3989e0b7ad229f4fd6f14671b02" dependencies = [ "glob", "humantime", @@ -1511,7 +1491,7 @@ dependencies = [ "assert_fs", "atty", "bstr", - "clap 3.2.16", + "clap 3.2.19", "clap-verbosity-flag", "concolor", "concolor-clap", diff --git a/Cargo.toml b/Cargo.toml index 72681e4..47618dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ doc = false [dependencies] typos = { version = "^0.10", path = "crates/typos" } -varcon-core = { version = "^2.2.4", path = "crates/varcon-core" } +varcon-core = { version = "^2.2.5", path = "crates/varcon-core" } typos-dict = { version = "^0.9", path = "crates/typos-dict", optional = true } typos-vars = { version = "^0.8", path = "crates/typos-vars", optional = true } unicase = "2.6" @@ -70,8 +70,8 @@ yansi = "0.5.1" concolor = { version = "0.0.8" } concolor-clap = { version = "0.0.10", features = ["api_unstable"] } bstr = "0.2" -once_cell = "1.13.0" -ahash = "0.7" +once_cell = "1.13.1" +ahash = "0.8" difflib = "0.4" proc-exit = "1.0" human-panic = "1.0.3" @@ -92,7 +92,7 @@ globset = "0.4.9" [dev-dependencies] assert_fs = "1.0" -trycmd = "0.13.5" +trycmd = "0.13.6" criterion = "0.3" [profile.dev] diff --git a/crates/codespell-dict/tests/codegen.rs b/crates/codespell-dict/tests/codegen.rs index 3c49003..bfc45a6 100644 --- a/crates/codespell-dict/tests/codegen.rs +++ b/crates/codespell-dict/tests/codegen.rs @@ -11,7 +11,12 @@ fn codegen() { } fn generate(file: &mut W) { - writeln!(file, "// This file is @generated {}", file!()).unwrap(); + writeln!( + file, + "// This file is @generated {}", + file!().replace('\\', "/") + ) + .unwrap(); writeln!(file).unwrap(); let dict = parse_dict(DICT); diff --git a/crates/misspell-dict/tests/codegen.rs b/crates/misspell-dict/tests/codegen.rs index bf57cfd..f8f2bea 100644 --- a/crates/misspell-dict/tests/codegen.rs +++ b/crates/misspell-dict/tests/codegen.rs @@ -13,7 +13,12 @@ fn codegen() { } fn generate(file: &mut W) { - writeln!(file, "// This file is @generated by {}", file!()).unwrap(); + writeln!( + file, + "// This file is @generated by {}", + file!().replace('\\', "/") + ) + .unwrap(); writeln!(file).unwrap(); let Words { diff --git a/crates/typos-dict/tests/codegen.rs b/crates/typos-dict/tests/codegen.rs index e7408db..e7c393a 100644 --- a/crates/typos-dict/tests/codegen.rs +++ b/crates/typos-dict/tests/codegen.rs @@ -11,7 +11,12 @@ fn codegen() { } fn generate(file: &mut W) { - writeln!(file, "// This file is @generated by {}", file!()).unwrap(); + writeln!( + file, + "// This file is @generated by {}", + file!().replace('\\', "/") + ) + .unwrap(); writeln!(file, "#![allow(clippy::unreadable_literal)]",).unwrap(); writeln!(file).unwrap(); diff --git a/crates/typos-vars/tests/codegen.rs b/crates/typos-vars/tests/codegen.rs index 38ada73..4f66906 100644 --- a/crates/typos-vars/tests/codegen.rs +++ b/crates/typos-vars/tests/codegen.rs @@ -25,7 +25,12 @@ static CATEGORIES: [varcon::Category; 4] = [ fn generate_variations(file: &mut W) { let entries = entries(); - writeln!(file, "// This file is @generated by {}", file!(),).unwrap(); + writeln!( + file, + "// This file is @generated by {}", + file!().replace('\\', "/") + ) + .unwrap(); writeln!( file, "#![allow(clippy::unreadable_literal, clippy::type_complexity)]", diff --git a/crates/varcon/tests/codegen.rs b/crates/varcon/tests/codegen.rs index 0faf8e6..ef5590a 100644 --- a/crates/varcon/tests/codegen.rs +++ b/crates/varcon/tests/codegen.rs @@ -7,10 +7,7 @@ fn codegen() { let content = String::from_utf8(content).unwrap(); let content = codegenrs::rustfmt(&content, None).unwrap(); - snapbox::Assert::new() - .normalize_paths(false) - .action_env(snapbox::DEFAULT_ACTION_ENV) - .eq_path("./src/codegen.rs", content); + snapbox::assert_eq_path("./src/codegen.rs", content); } fn generate(file: &mut W) { diff --git a/crates/wikipedia-dict/tests/codegen.rs b/crates/wikipedia-dict/tests/codegen.rs index b8a9e23..f1a7fc6 100644 --- a/crates/wikipedia-dict/tests/codegen.rs +++ b/crates/wikipedia-dict/tests/codegen.rs @@ -11,7 +11,12 @@ fn codegen() { } fn generate(file: &mut W) { - writeln!(file, "// This file is @generated by {}", file!()).unwrap(); + writeln!( + file, + "// This file is @generated by {}", + file!().replace('\\', "/") + ) + .unwrap(); writeln!(file).unwrap(); let dict = parse_dict(DICT);