diff --git a/Cargo.lock b/Cargo.lock index f4cfedf..6685a90 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,10 +1,30 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" -version = "1.2.1" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cfg-if" @@ -14,11 +34,11 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" -version = "2.33.3" +version = "2.33.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "826bf7bc84f9435630275cb8e802a4a0ec792b615969934bd16d42ffed10f207" dependencies = [ - "bitflags", + "bitflags 1.3.2", "term_size", "textwrap", "unicode-width", @@ -26,18 +46,18 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.26" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "801bbab217d7f79c0062f4f7205b5d4427c6d1a7bd7aafdd1475f7c59d62b283" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ "cfg-if", ] [[package]] name = "futf" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b" +checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" dependencies = [ "mac", "new_debug_unreachable", @@ -51,40 +71,49 @@ checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ "cfg-if", "libc", - "wasi", + "wasi 0.9.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "html5ever" -version = "0.25.1" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafcf38a1a36118242d29b92e1b08ef84e67e4a5ed06e0a80be20e6a32bfed6b" +checksum = "c13771afe0e6e846f1e67d038d4cb29998a6779f93c809212e4e9c32efd244d4" dependencies = [ "log", "mac", - "markup5ever", + "markup5ever 0.12.1", "proc-macro2", "quote", "syn", ] [[package]] -name = "itoa" -version = "0.4.7" +name = "libc" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" [[package]] -name = "lazy_static" -version = "1.4.0" +name = "lock_api" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89203f3fba0a3795506acaad8ebce3c80c0af93f994d5a1d7a0b1eeb23271929" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] [[package]] name = "log" @@ -107,11 +136,10 @@ version = "0.3.0" dependencies = [ "encoding_rs", "html5ever", - "lazy_static", "log", "markup5ever_rcdom", "mime", - "rand", + "rand 0.7.3", "string_cache", "tendril", "xml-rs", @@ -130,16 +158,27 @@ dependencies = [ [[package]] name = "markup5ever" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae38d669396ca9b707bfc3db254bc382ddb94f57cc5c235f34623a669a01dab" +checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" dependencies = [ "log", - "phf", - "phf_codegen", - "serde", - "serde_derive", - "serde_json", + "phf 0.8.0", + "phf_codegen 0.8.0", + "string_cache", + "string_cache_codegen", + "tendril", +] + +[[package]] +name = "markup5ever" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ce3abbeba692c8b8441d036ef91aea6df8da2c6b6e21c7e14d3c18e526be45" +dependencies = [ + "log", + "phf 0.11.2", + "phf_codegen 0.11.2", "string_cache", "string_cache_codegen", "tendril", @@ -150,21 +189,50 @@ name = "markup5ever_rcdom" version = "0.1.0" source = "git+https://github.com/dekellum/html5ever?branch=rcdom#14e6e4be4299d3940bed8b91de88241cbbc81d56" dependencies = [ - "markup5ever", + "markup5ever 0.10.1", "tendril", ] [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "parking_lot" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] [[package]] name = "phf" @@ -172,7 +240,16 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" dependencies = [ - "phf_shared", + "phf_shared 0.8.0", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_shared 0.11.2", ] [[package]] @@ -181,8 +258,18 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.8.0", + "phf_shared 0.8.0", +] + +[[package]] +name = "phf_codegen" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +dependencies = [ + "phf_generator 0.11.2", + "phf_shared 0.11.2", ] [[package]] @@ -191,8 +278,28 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" dependencies = [ - "phf_shared", - "rand", + "phf_shared 0.8.0", + "rand 0.7.3", +] + +[[package]] +name = "phf_generator" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" +dependencies = [ + "phf_shared 0.10.0", + "rand 0.8.5", +] + +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand 0.8.5", ] [[package]] @@ -204,11 +311,32 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +dependencies = [ + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "precomputed-hash" @@ -218,18 +346,18 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "proc-macro2" -version = "1.0.24" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] name = "quote" -version = "1.0.8" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -240,14 +368,25 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.16", "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.2.2", + "rand_core 0.5.1", "rand_hc", "rand_pcg", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + [[package]] name = "rand_chacha" version = "0.2.2" @@ -255,7 +394,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[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 0.6.4", ] [[package]] @@ -264,7 +413,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", ] [[package]] @@ -273,7 +431,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", ] [[package]] @@ -282,26 +440,38 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" dependencies = [ - "rand_core", + "rand_core 0.5.1", ] [[package]] -name = "ryu" -version = "1.0.5" +name = "redox_syscall" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.118" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" +checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" +dependencies = [ + "serde_derive", +] [[package]] name = "serde_derive" -version = "1.0.118" +version = "1.0.205" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" +checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" dependencies = [ "proc-macro2", "quote", @@ -309,63 +479,59 @@ dependencies = [ ] [[package]] -name = "serde_json" -version = "1.0.61" +name = "siphasher" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a" -dependencies = [ - "itoa", - "ryu", - "serde", -] +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] -name = "siphasher" -version = "0.3.3" +name = "smallvec" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "string_cache" -version = "0.8.1" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddb1139b5353f96e429e1a5e19fbaf663bddedaa06d1dbd49f82e352601209a" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ - "lazy_static", "new_debug_unreachable", - "phf_shared", + "once_cell", + "parking_lot", + "phf_shared 0.10.0", "precomputed-hash", "serde", ] [[package]] name = "string_cache_codegen" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f24c8e5e19d22a726626f1a5e16fe15b132dcf21d10177fa5a45ce7962996b97" +checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" dependencies = [ - "phf_generator", - "phf_shared", + "phf_generator 0.10.0", + "phf_shared 0.10.0", "proc-macro2", "quote", ] [[package]] name = "syn" -version = "1.0.58" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] name = "tendril" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9ef557cb397a4f0a5a3a628f06515f78563f2209e64d47055d9dc6052bf5e33" +checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" dependencies = [ "encoding_rs", "futf", @@ -394,22 +560,22 @@ dependencies = [ ] [[package]] -name = "unicode-width" -version = "0.1.8" +name = "unicode-ident" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "unicode-xid" -version = "0.2.1" +name = "unicode-width" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "utf-8" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" [[package]] name = "wasi" @@ -417,6 +583,12 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + [[package]] name = "winapi" version = "0.3.9" @@ -439,8 +611,93 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "xml-rs" -version = "0.8.3" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "539a77ee7c0de333dcc6da69b177380a0b81e0dacfa4f7344c465a36871ee601" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07db065a5cf61a7e4ba64f29e67db906fb1787316516c4e6e5ff0fea1efcd8a" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml index 8d626ea..58f2877 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ "marked", "marked-cli" ] exclude = [ "ammonia-compare", "marked-sanitizer" ] diff --git a/marked-cli/Cargo.toml b/marked-cli/Cargo.toml index 261bbd6..0356cf5 100644 --- a/marked-cli/Cargo.toml +++ b/marked-cli/Cargo.toml @@ -14,7 +14,7 @@ edition = "2018" [dependencies] marked = { version=">=0.3.0, <0.4.0" } -html5ever = { version=">=0.25.1, <0.26" } +html5ever = { version=">=0.27.0, <0.28" } encoding_rs = { version=">=0.8.13, <0.9" } clap = { version=">=2.33.0, <2.34", default-features=false, features=["wrap_help"] } log = { version=">=0.4.4, <0.4.15", features = ["std"] } diff --git a/marked/Cargo.toml b/marked/Cargo.toml index 12d5e74..9db2295 100644 --- a/marked/Cargo.toml +++ b/marked/Cargo.toml @@ -2,7 +2,8 @@ name = "marked" version = "0.3.0" authors = ["David Kellum "] -edition = "2018" +edition = "2021" +rust-version = "1.80" license = "MIT/Apache-2.0" description = "Parsing, filtering, selecting and serializing HTML/XML markup." repository = "https://github.com/dekellum/marked" @@ -15,18 +16,18 @@ build = "build.rs" doctest = false [dependencies] -html5ever = { version=">=0.25.1, <0.26" } -tendril = { version=">=0.4.1, <0.5", features=["encoding_rs"] } -encoding_rs = { version=">=0.8.13, <0.9" } -xml-rs = { version=">=0.8, <0.9", package="xml-rs", optional=true } -string_cache = { version=">=0.8.0, <0.9" } -mime = { version=">=0.3.14, <0.4" } -log = { version=">=0.4.4, <0.5", features = ["std"] } -lazy_static = { version=">=1.3.0, <1.5" } +html5ever = { version="0.27.*" } +tendril = { version="0.4.*", features=["encoding_rs"] } +encoding_rs = { version="0.8.12" } # Match tendril dependency +xml-rs = { version="0.8.*", package="xml-rs", optional=true } +string_cache = { version="0.8.*" } +mime = { version="0.3.14" } +log = { version="0.4.*", features = ["std"] } [features] default = [] xml = ["xml-rs"] +cargo-clippy = [] [dev-dependencies] rand = { version=">=0.7.0, <0.8" } diff --git a/marked/clippy.toml b/marked/clippy.toml index 78eb145..5729b3f 100644 --- a/marked/clippy.toml +++ b/marked/clippy.toml @@ -1 +1 @@ -msrv = "1.38.0" +msrv = "1.80.0" diff --git a/marked/src/dom.rs b/marked/src/dom.rs index fc05db2..5ecdded 100644 --- a/marked/src/dom.rs +++ b/marked/src/dom.rs @@ -96,6 +96,7 @@ pub enum NodeData { Pi(ProcessingInstruction), } +#[allow(clippy::manual_non_exhaustive)] // Maybe? /// Document type definition details. #[derive(Clone, Debug)] pub struct DocumentType { @@ -103,6 +104,7 @@ pub struct DocumentType { _priv: () } +#[allow(clippy::manual_non_exhaustive)] // Maybe? /// Processing instruction details. #[derive(Clone, Debug)] pub struct ProcessingInstruction { @@ -110,6 +112,7 @@ pub struct ProcessingInstruction { _priv: () } +#[allow(clippy::manual_non_exhaustive)] // Maybe? /// A markup element with name and attributes. #[derive(Clone, Debug)] pub struct Element { @@ -174,9 +177,9 @@ impl Document { pub fn root_element(&self) -> Option { let document_node = &self[Document::DOCUMENT_NODE_ID]; debug_assert!( - (if let NodeData::Document = document_node.data { true } - else { false }), - "not document node: {:?}", document_node); + matches!(document_node.data, NodeData::Document), + "not document node: {document_node:?}", + ); debug_assert!(document_node.parent.is_none()); debug_assert!(document_node.next_sibling.is_none()); debug_assert!(document_node.prev_sibling.is_none()); @@ -215,9 +218,9 @@ impl Document { fn push_node(&mut self, node: Node) -> NodeId { debug_assert!( - (if let NodeData::Document | NodeData::Hole = node.data { false } - else { true }), - "Invalid push {:?}", node.data); + ! matches!(node.data, NodeData::Document | NodeData::Hole), + "Invalid push {:?}", node.data, + ); let next_index = self.nodes.len() .try_into() .expect("Document (u32) node index overflow"); @@ -424,7 +427,7 @@ impl Document { if let NodeData::Text(t) = &node.data { match &mut text { None => text = Some(t.clone()), - Some(text) => text.push_tendril(&t), + Some(text) => text.push_tendril(t), } ns.push_if(node.next_sibling); } else { @@ -825,9 +828,9 @@ impl NodeData { #[inline] fn assert_suitable_parent(&self) { debug_assert!( - (if let NodeData::Document | NodeData::Elem(_) = self { true } - else { false }), - "Not a suitable parent: {:?}", self) + matches!(self, NodeData::Document | NodeData::Elem(_)), + "Not a suitable parent: {:?}", self, + ) } } diff --git a/marked/src/dom/html/meta.rs b/marked/src/dom/html/meta.rs index d81e276..209b4a3 100644 --- a/marked/src/dom/html/meta.rs +++ b/marked/src/dom/html/meta.rs @@ -6,17 +6,15 @@ //! also checked in. use std::collections::HashMap; - -use lazy_static::lazy_static; +use std::sync::LazyLock; use crate::dom::LocalName; -lazy_static! { - /// A static lookup table for metadata on known HTML tags. - pub static ref TAG_META: HashMap = init_tag_metadata(); -} +/// A static lookup table for metadata on known HTML tags. +pub static TAG_META: LazyLock> = LazyLock::new(init_tag_metadata); /// Metadata about HTML tags and their attributes. +#[derive(Default)] pub struct TagMeta { is_empty: bool, is_deprecated: bool, @@ -81,18 +79,7 @@ impl TagMeta { } } -impl Default for TagMeta { - fn default() -> TagMeta { - TagMeta { - is_empty: false, - is_deprecated: false, - is_inline: false, - is_meta: false, - is_banned: false, - basic_attrs: vec![], - } - } -} + /// `Namespace` constants pub mod ns { @@ -106,6 +93,7 @@ pub mod ns { pub mod t { use html5ever::local_name as lname; use crate::dom::LocalName; + use std::sync::LazyLock; /// Tag ``: anchor. /// (meta: inline) @@ -362,13 +350,11 @@ pub mod t { pub const Q: LocalName = lname!("q"); /// Tag ``: ruby base text. pub const RB: LocalName = lname!("rb"); - lazy_static::lazy_static! { - /// Tag ``: ruby base container (complex). - /// (meta: undefined) - /// - /// This is a lazy static (struct) as its not defined by html5ever. - pub static ref RBC: LocalName = "rbc".into(); - } + /// Tag ``: ruby base container (complex). + /// (meta: undefined) + /// + /// This is a lazy static (struct) as its not defined by html5ever. + pub static RBC: LazyLock = LazyLock::new(|| "rbc".into()); /// Tag ``: ruby simple text container. pub const RP: LocalName = lname!("rp"); /// Tag ``: ruby annotation text. @@ -475,6 +461,7 @@ pub mod t { pub mod a { use html5ever::local_name as lname; use crate::dom::LocalName; + use std::sync::LazyLock; pub const ABBR: LocalName = lname!("abbr"); /// Attribute accept: (file) types accepted. @@ -504,12 +491,10 @@ pub mod a { pub const COORDS: LocalName = lname!("coords"); pub const DATA: LocalName = lname!("data"); pub const DATETIME: LocalName = lname!("datetime"); - lazy_static::lazy_static! { - /// Attribute decoding: preferred method to decode. - /// - /// This is a lazy static (struct) as its not defined by html5ever. - pub static ref DECODING: LocalName = "decoding".into(); - } + /// Attribute decoding: preferred method to decode. + /// + /// This is a lazy static (struct) as its not defined by html5ever. + pub static DECODING: LazyLock = LazyLock::new(|| "decoding".into()); /// Attribute dir: Text direction; ltr or rtl. pub const DIR: LocalName = lname!("dir"); pub const FRAME: LocalName = lname!("frame"); diff --git a/marked/src/dom/node_ref.rs b/marked/src/dom/node_ref.rs index 74dd606..6c46a8e 100644 --- a/marked/src/dom/node_ref.rs +++ b/marked/src/dom/node_ref.rs @@ -132,11 +132,7 @@ impl<'a> NodeRef<'a> { #[inline] fn for_some_node(&self, id: Option) -> Option> { - if let Some(id) = id { - Some(NodeRef::new(self.doc, id)) - } else { - None - } + id.map(|id| NodeRef::new(self.doc, id)) } } diff --git a/marked/src/dom/serializer.rs b/marked/src/dom/serializer.rs index cec9e57..fc00e68 100644 --- a/marked/src/dom/serializer.rs +++ b/marked/src/dom/serializer.rs @@ -70,18 +70,19 @@ impl<'a> Serialize for NodeRef<'a> { serializer.write_doctype(&dt.name) } (IncludeNode, Text(ref t)) => { - serializer.write_text(&t) + serializer.write_text(t) } (IncludeNode, Comment(ref t)) => { - serializer.write_comment(&t) + serializer.write_comment(t) } (IncludeNode, Pi(ref pi)) => { - serializer.write_processing_instruction(&"", &pi.data) + serializer.write_processing_instruction("", &pi.data) } } } } +#[allow(clippy::to_string_trait_impl)] /// Implemented via [`Document::serialize`]. impl ToString for Document { fn to_string(&self) -> String { @@ -127,6 +128,7 @@ impl<'a> NodeRef<'a> { } } +#[allow(clippy::to_string_trait_impl)] /// Implemented via [`NodeRef::serialize`]. impl<'a> ToString for NodeRef<'a> { fn to_string(&self) -> String { diff --git a/marked/src/dom/tests.rs b/marked/src/dom/tests.rs index 8cb491a..b422b01 100644 --- a/marked/src/dom/tests.rs +++ b/marked/src/dom/tests.rs @@ -24,9 +24,9 @@ use rand::Rng; #[cfg(target_pointer_width = "64")] fn size_of() { use std::mem::size_of; - assert_eq!(size_of::(), 80); + assert_eq!(size_of::(), 72); assert_eq!(size_of::(), 4); - assert_eq!(size_of::(), 56); + assert_eq!(size_of::(), 48); assert_eq!(size_of::(), 48); assert_eq!(size_of::(), 40); assert_eq!(size_of::>(), 24); diff --git a/marked/src/lib.rs b/marked/src/lib.rs index 5901001..f2cc8af 100644 --- a/marked/src/lib.rs +++ b/marked/src/lib.rs @@ -6,7 +6,7 @@ #![warn(rust_2018_idioms)] -#[macro_use] extern crate html5ever; +#[macro_use] pub extern crate html5ever; /// Initial parse buffer size in which encoding hints are considered, possibly /// triggering reparse.