diff --git a/Cargo.lock b/Cargo.lock index a76799e..2538c29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,9 +2,9 @@ # It is not intended for manual editing. [[package]] name = "adler" -version = "0.2.3" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aho-corasick" @@ -26,9 +26,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" +checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" [[package]] name = "arrayvec" @@ -168,7 +168,7 @@ checksum = "ef37b86e2fa961bae5a4d212708ea0154f904ce31d1a4a7f47e1bbc33a0c040b" dependencies = [ "async-io", "blocking", - "cfg-if 1.0.0", + "cfg-if", "event-listener", "futures-lite", "once_cell", @@ -179,7 +179,7 @@ dependencies = [ [[package]] name = "async-smtp" version = "0.3.4" -source = "git+https://github.com/amaurym/async-smtp?branch=am-fast-socks#eac57391b68a144d7dfb8b74ee49827164f46d9b" +source = "git+https://github.com/async-email/async-smtp?branch=master#0f1c4c6a565833f8c7fc314de84c4cbbc8da2b4a" dependencies = [ "async-native-tls", "async-std", @@ -191,7 +191,7 @@ dependencies = [ "hostname 0.1.5", "log", "nom", - "pin-project 0.4.27", + "pin-project 0.4.28", "pin-utils", "serde", "serde_derive", @@ -229,9 +229,9 @@ dependencies = [ [[package]] name = "async-std-resolver" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecc7e0c04d9ac4e9f7e4c77c418891264179f2a7ae728112af0f093e743ef5f" +checksum = "f665c56111e244fe38e7708ee10948a4356ad6a548997c21f5a63a0f4e0edc4d" dependencies = [ "async-std", "async-trait", @@ -249,9 +249,9 @@ checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" [[package]] name = "async-trait" -version = "0.1.42" +version = "0.1.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" +checksum = "36ea56748e10732c49404c153638a15ec3d6211ec5ff35d9bb20e13b93576adf" dependencies = [ "proc-macro2", "quote", @@ -301,25 +301,13 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "block-buffer" -version = "0.7.3" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "block-padding", - "byte-tools", - "byteorder", "generic-array", ] -[[package]] -name = "block-padding" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -dependencies = [ - "byte-tools", -] - [[package]] name = "blocking" version = "1.0.2" @@ -357,17 +345,11 @@ version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" -[[package]] -name = "byte-tools" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" - [[package]] name = "byteorder" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" +checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" @@ -387,12 +369,6 @@ version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -402,7 +378,7 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "check-if-email-exists" version = "0.8.19" -source = "git+https://github.com/reacherhq/check-if-email-exists.git#aac0586fb078f429856f6f34b6bb36ae0a237fb8" +source = "git+https://github.com/reacherhq/check-if-email-exists.git#bbf218ab5e8f379312d922763ce4c87dd66f4a69" dependencies = [ "async-smtp", "async-std", @@ -469,9 +445,9 @@ dependencies = [ [[package]] name = "console" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc80946b3480f421c2f17ed1cb841753a371c7c5104f51d507e13f532c856aa" +checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" dependencies = [ "encode_unicode", "lazy_static", @@ -498,13 +474,19 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +[[package]] +name = "cpuid-bool" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" + [[package]] name = "crc32fast" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -513,27 +495,26 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f6cb3c7f5b8e51bc3ebb73a2327ad4abdbd119dc13223f14f961d2f38486756" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bae8f328835f8f5a6ceb6a7842a7f2d0c03692adb5c889347235d59194731fe3" +checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" dependencies = [ "autocfg", - "cfg-if 1.0.0", + "cfg-if", "lazy_static", - "loom", ] [[package]] name = "ctor" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8f45d9ad417bcef4817d614a501ab55cdd96a6fdb24f49aab89a54acfd66b19" +checksum = "5e98e2ad1a782e33928b96fc3948e7c355e5af34ba4de7670fe8bac2a3b2006d" dependencies = [ "quote", "syn", @@ -627,9 +608,9 @@ checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] name = "digest" -version = "0.8.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ "generic-array", ] @@ -640,7 +621,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -679,7 +660,7 @@ version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -700,12 +681,6 @@ version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" -[[package]] -name = "fake-simd" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" - [[package]] name = "fast-socks5" version = "0.4.2" @@ -743,7 +718,7 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crc32fast", "libc", "miniz_oxide", @@ -912,26 +887,14 @@ dependencies = [ "slab", ] -[[package]] -name = "generator" -version = "0.6.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9fed24fd1e18827652b4d55652899a1e9da8e54d91624dc3437a5bc3a9f9a9c" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "winapi", -] - [[package]] name = "generic-array" -version = "0.12.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ "typenum", + "version_check", ] [[package]] @@ -949,7 +912,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -960,7 +923,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.10.2+wasi-snapshot-preview1", ] @@ -986,9 +949,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" +checksum = "fc018e188373e2777d0ef2467ebff62a08e66c3f5857b23c8fbec3018210dc00" dependencies = [ "bytes", "fnv", @@ -1001,7 +964,6 @@ dependencies = [ "tokio", "tokio-util", "tracing", - "tracing-futures", ] [[package]] @@ -1012,9 +974,9 @@ checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" [[package]] name = "headers" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62689dc57c7456e69712607ffcbd0aa1dfcccf9af73727e9b25bc1825375cac3" +checksum = "f0b7591fb62902706ae8e7aaff416b1b0fa2c0fd0878b46dc13baa3712d8a855" dependencies = [ "base64 0.13.0", "bitflags", @@ -1101,12 +1063,13 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" +checksum = "5dfb77c123b4e2f72a2069aeae0b4b4949cc7e966df277813fc16347e7549737" dependencies = [ "bytes", "http", + "pin-project-lite", ] [[package]] @@ -1145,7 +1108,7 @@ checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" [[package]] name = "hubcaps" version = "0.6.2" -source = "git+https://github.com/softprops/hubcaps.git#324d02fbb371782c82e9a13b839b86894475c91f" +source = "git+https://github.com/softprops/hubcaps.git#a9e6616ecc7b8eef0ea0eaf6055d9610c8961500" dependencies = [ "base64 0.13.0", "data-encoding", @@ -1165,9 +1128,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.4" +version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e946c2b1349055e0b72ae281b238baf1a3ea7307c7e9f9d64673bdd9c26ac7" +checksum = "8bf09f61b52cfcf4c00de50df88ae423d6c02354e385a86341133b5338630ad1" dependencies = [ "bytes", "futures-channel", @@ -1179,8 +1142,8 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project 1.0.5", - "socket2", + "pin-project 1.0.6", + "socket2 0.4.0", "tokio", "tower-service", "tracing", @@ -1236,9 +1199,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.6.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" +checksum = "824845a0bf897a9042383849b02c1bc219c2383772efcd5c6f9766fa4b81aef3" dependencies = [ "autocfg", "hashbrown", @@ -1268,7 +1231,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1277,7 +1240,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" dependencies = [ - "socket2", + "socket2 0.3.19", "widestring", "winapi", "winreg 0.6.2", @@ -1297,9 +1260,9 @@ checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] name = "js-sys" -version = "0.3.47" +version = "0.3.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" +checksum = "dc15e39392125075f60c95ba416f5381ff6c3a948ff02ab12464715adf56c821" dependencies = [ "wasm-bindgen", ] @@ -1347,16 +1310,16 @@ checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374" dependencies = [ "arrayvec", "bitflags", - "cfg-if 1.0.0", + "cfg-if", "ryu", "static_assertions", ] [[package]] name = "libc" -version = "0.2.86" +version = "0.2.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" +checksum = "8916b1f6ca17130ec6568feccee27c156ad12037880833a3b842a823236502e7" [[package]] name = "linked-hash-map" @@ -1388,21 +1351,10 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "value-bag", ] -[[package]] -name = "loom" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44c73b4636e497b4917eb21c33539efa3816741a2d3ff26c6316f1b529481a4" -dependencies = [ - "cfg-if 1.0.0", - "generator", - "scoped-tls", -] - [[package]] name = "lru-cache" version = "0.1.2" @@ -1423,6 +1375,7 @@ dependencies = [ "deadpool", "derive_builder", "doc-comment", + "fast_chemail", "futures", "glob", "headers", @@ -1461,9 +1414,9 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "mailchecker" -version = "4.0.3" +version = "4.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45582a7dda36fe9f641d5f23ae8b3ffa54fb134f5c3d2a3da7160120da9b2a9e" +checksum = "1be9884d8adeab79160bc07b42bce71324406c4792fcf9e785476dbc796d3d55" dependencies = [ "fast_chemail", ] @@ -1523,9 +1476,9 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "miniz_oxide" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", "autocfg", @@ -1533,9 +1486,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.7.9" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5dede4e2065b3842b8b0af444119f3aa331cc7cc2dd20388bfb0f5d5a38823a" +checksum = "cf80d3e903b34e0bd7282b218398aec54e082c840d9baf8339e0080a0c542956" dependencies = [ "libc", "log", @@ -1546,11 +1499,10 @@ dependencies = [ [[package]] name = "miow" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" dependencies = [ - "socket2", "winapi", ] @@ -1574,12 +1526,12 @@ dependencies = [ [[package]] name = "nb-connect" -version = "1.0.3" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670361df1bc2399ee1ff50406a0d422587dd3bb0da596e1978fe8e05dabddf4f" +checksum = "a19900e7eee95eb2b3c2e26d12a874cc80aaf750e31be6fcbe743ead369fa45d" dependencies = [ "libc", - "socket2", + "socket2 0.4.0", ] [[package]] @@ -1662,27 +1614,27 @@ checksum = "17b02fc0ff9a9e4b35b3342880f48e896ebf69f2967921fe8646bf5b7125956a" [[package]] name = "once_cell" -version = "1.6.0" +version = "1.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad167a2f54e832b82dbe003a046280dceffe5227b5f79e08e363a29638cfddd" +checksum = "af8b08b04175473088b46763e51ee54da5f9a164bc162f615b91bc179dbf15a3" [[package]] name = "opaque-debug" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.32" +version = "0.10.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" +checksum = "a61075b62a23fef5a29815de7536d940aa35ce96d18ce0cc5076272db678a577" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", - "lazy_static", "libc", + "once_cell", "openssl-sys", ] @@ -1694,18 +1646,18 @@ checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" [[package]] name = "openssl-src" -version = "111.14.0+1.1.1j" +version = "111.15.0+1.1.1k" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055b569b5bd7e5462a1700f595c7c7d487691d73b5ce064176af7f9f0cbb80a9" +checksum = "b1a5f6ae2ac04393b217ea9f700cd04fa9bf3d93fae2872069f3d15d908af70a" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.60" +version = "0.9.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" +checksum = "313752393519e876837e09e1fa183ddef0be7735868dced3196f4472d536277f" dependencies = [ "autocfg", "cc", @@ -1747,7 +1699,7 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "instant", "libc", "redox_syscall", @@ -1812,27 +1764,27 @@ dependencies = [ [[package]] name = "pin-project" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" +checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f" dependencies = [ - "pin-project-internal 0.4.27", + "pin-project-internal 0.4.28", ] [[package]] name = "pin-project" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" +checksum = "bc174859768806e91ae575187ada95c91a29e96a98dc5d2cd9a1fed039501ba6" dependencies = [ - "pin-project-internal 1.0.5", + "pin-project-internal 1.0.6", ] [[package]] name = "pin-project-internal" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" +checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e" dependencies = [ "proc-macro2", "quote", @@ -1841,9 +1793,9 @@ dependencies = [ [[package]] name = "pin-project-internal" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b" +checksum = "a490329918e856ed1b083f244e3bfe2d8c4f336407e4ea9e1a9f479ff09049e5" dependencies = [ "proc-macro2", "quote", @@ -1852,9 +1804,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" +checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" [[package]] name = "pin-utils" @@ -1870,11 +1822,11 @@ checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] name = "polling" -version = "2.0.2" +version = "2.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a7bc6b2a29e632e45451c941832803a18cce6781db04de8a04696cdca8bde4" +checksum = "4fc12d774e799ee9ebae13f4076ca003b40d18a11ac0f3641e6f899618580b7b" dependencies = [ - "cfg-if 0.1.10", + "cfg-if", "libc", "log", "wepoll-sys", @@ -2106,14 +2058,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.4.3" +version = "1.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" +checksum = "957056ecddbeba1b26965114e191d2e8589ce74db242b6ea25fc4062427a5c19" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", ] [[package]] @@ -2127,9 +2078,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.22" +version = "0.6.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" +checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548" [[package]] name = "remove_dir_all" @@ -2142,9 +2093,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0460542b551950620a3648c6aa23318ac6b3cd779114bd873209e6e8b5eb1c34" +checksum = "bf12057f289428dbf5c591c74bf10392e4a8003f993405a902f20117019022d4" dependencies = [ "async-compression", "base64 0.13.0", @@ -2203,12 +2154,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rustversion" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb5d2a036dc6d2d8fd16fde3498b04306e29bd193bf306a57427019b823d5acd" - [[package]] name = "ryu" version = "1.0.5" @@ -2225,12 +2170,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - [[package]] name = "scopeguard" version = "1.1.0" @@ -2239,9 +2178,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" +checksum = "3670b1d2fdf6084d192bc71ead7aabe6c06aa2ea3fbd9cc3ac111fa5c2b1bd84" dependencies = [ "bitflags", "core-foundation", @@ -2252,9 +2191,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" +checksum = "3676258fd3cfe2c9a0ec99ce3038798d847ce3e4bb17746373eb9f0f1ac16339" dependencies = [ "core-foundation-sys", "libc", @@ -2262,18 +2201,18 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.123" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" +checksum = "558dc50e1a5a5fa7112ca2ce4effcb321b0300c0d4ccf0776a9f60cd89031171" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.123" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" +checksum = "b093b7a2bb58203b5da3056c05b4ec1fed827dcfdb37347a8841695263b3d06d" dependencies = [ "proc-macro2", "quote", @@ -2282,9 +2221,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.62" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" +checksum = "799e97dc9fdae36a5c8b8f2cae9ce2ee9fdce2058c57a93e6099d919fd982f79" dependencies = [ "itoa", "ryu", @@ -2317,13 +2256,14 @@ dependencies = [ [[package]] name = "sha-1" -version = "0.8.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +checksum = "dfebf75d25bd900fd1e7d11501efab59bc846dbc76196839663e6637bba9f25f" dependencies = [ "block-buffer", + "cfg-if", + "cpuid-bool", "digest", - "fake-simd", "opaque-debug", ] @@ -2338,9 +2278,9 @@ dependencies = [ [[package]] name = "signal-hook" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7f3f92a1da3d6b1d32245d0cbcbbab0cfc45996d8df619c42bccfa6d2bbb5f" +checksum = "6aa894ef3fade0ee7243422f4fbbd6c2b48e6de767e621d37ef65f2310f53cea" dependencies = [ "libc", "signal-hook-registry", @@ -2368,9 +2308,9 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7" +checksum = "cbce6d4507c7e4a3962091436e56e95290cb71fa302d0d270e32130b75fbff27" [[package]] name = "slab" @@ -2396,7 +2336,17 @@ version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", + "libc", + "winapi", +] + +[[package]] +name = "socket2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" +dependencies = [ "libc", "winapi", ] @@ -2476,9 +2426,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.60" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" +checksum = "f3a1d708c221c5a612956ef9f75b37e454e88d1f7b899fbd3a18d4252012d663" dependencies = [ "proc-macro2", "quote", @@ -2491,7 +2441,7 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "rand 0.8.3", "redox_syscall", @@ -2531,9 +2481,9 @@ dependencies = [ [[package]] name = "textwrap" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89bc85084ac4e273c6bbf99050d932821af166392aaedc5038a38e1f229cdf5" +checksum = "cd05616119e612a8041ef58f2b578906cc2531a6069047ae092cfb86a325d835" dependencies = [ "smawk", "unicode-width", @@ -2559,15 +2509,6 @@ dependencies = [ "syn", ] -[[package]] -name = "thread_local" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" -dependencies = [ - "once_cell", -] - [[package]] name = "time" version = "0.1.43" @@ -2595,9 +2536,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.2.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8190d04c665ea9e6b6a0dc45523ade572c088d2e6566244c1122671dbf4ae3a" +checksum = "134af885d758d645f0f0505c9a8b3f9bf8a348fd822e112ab5248138348f1722" dependencies = [ "autocfg", "bytes", @@ -2648,9 +2589,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb7cb2f00c5ae8df755b252306272cd1790d39728363936e01827e11f0b017b" +checksum = "5143d049e85af7fbc36f5454d990e62c2df705b3589f123b71f441b6b59f443f" dependencies = [ "bytes", "futures-core", @@ -2681,7 +2622,7 @@ version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "pin-project-lite", "tracing-core", ] @@ -2695,16 +2636,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project 1.0.5", - "tracing", -] - [[package]] name = "treeline" version = "0.1.0" @@ -2713,12 +2644,12 @@ checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" [[package]] name = "trust-dns-proto" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98a0381b2864c2978db7f8e17c7b23cca5a3a5f99241076e13002261a8ecbabd" +checksum = "8d57e219ba600dd96c2f6d82eb79645068e14edbc5c7e27514af40436b88150c" dependencies = [ "async-trait", - "cfg-if 1.0.0", + "cfg-if", "data-encoding", "enum-as-inner", "futures-channel", @@ -2731,17 +2662,18 @@ dependencies = [ "rand 0.8.3", "smallvec", "thiserror", + "tinyvec", "tokio", "url", ] [[package]] name = "trust-dns-resolver" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3072d18c10bd621cb00507d59cfab5517862285c353160366e37fbf4c74856e4" +checksum = "b0437eea3a6da51acc1e946545ff53d5b8fb2611ff1c3bed58522dde100536ae" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "futures-util", "ipconfig", "lazy_static", @@ -2762,9 +2694,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "typenum" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" +checksum = "879f6906492a7cd215bfa4cf595b600146ccfac0c79bcbd1f3000162af5e8b06" [[package]] name = "unicase" @@ -2862,9 +2794,9 @@ checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" [[package]] name = "vec-arena" -version = "1.0.0" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eafc1b9b2dfc6f5529177b62cf806484db55b32dc7c9658a118e11bbeb33061d" +checksum = "34b2f665b594b07095e3ac3f718e13c2197143416fae4c5706cffb7b1af8d7f1" [[package]] name = "vec_map" @@ -2874,9 +2806,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" [[package]] name = "wait-timeout" @@ -2917,11 +2849,11 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.70" +version = "0.2.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be" +checksum = "8fe8f61dba8e5d645a4d8132dc7a0a66861ed5e1045d2c0ed940fab33bac0fbe" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "serde", "serde_json", "wasm-bindgen-macro", @@ -2929,9 +2861,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.70" +version = "0.2.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7" +checksum = "046ceba58ff062da072c7cb4ba5b22a37f00a302483f7e2a6cdc18fedbdc1fd3" dependencies = [ "bumpalo", "lazy_static", @@ -2944,11 +2876,11 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3de431a2910c86679c34283a33f66f4e4abd7e0aec27b6669060148872aadf94" +checksum = "73157efb9af26fb564bb59a009afd1c7c334a44db171d280690d0c3faaec3468" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -2956,9 +2888,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.70" +version = "0.2.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" +checksum = "0ef9aa01d36cda046f797c57959ff5f3c615c9cc63997a8d545831ec7976819b" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2966,9 +2898,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.70" +version = "0.2.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" +checksum = "96eb45c1b2ee33545a813a92dbb53856418bf7eb54ab34f7f7ff1448a5b3735d" dependencies = [ "proc-macro2", "quote", @@ -2979,15 +2911,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.70" +version = "0.2.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" +checksum = "b7148f4696fb4960a346eaa60bbfb42a1ac4ebba21f750f75fc1375b098d5ffa" [[package]] name = "web-sys" -version = "0.3.47" +version = "0.3.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" +checksum = "59fe19d70f5dacc03f6e46777213facae5ac3801575d56ca6cbd4c93dcd12310" dependencies = [ "js-sys", "wasm-bindgen", @@ -3059,9 +2991,9 @@ dependencies = [ [[package]] name = "wiremock" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8af3a78ec915ad57a26b684e781c984c929aa5b6b9d0b75c27decc872c01b973" +checksum = "1cbd58fcf4ac80633ef8f48abdfa1d8743150593c6def666d114c10aa90afac8" dependencies = [ "async-trait", "deadpool", @@ -3074,7 +3006,7 @@ dependencies = [ "regex", "serde", "serde_json", - "textwrap 0.13.3", + "textwrap 0.13.4", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index 0bd972f..de7ebba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -authors = ["Matthias Endler "] +authors = ["Matthias Endler "] description = "A glorious link checker" documentation = "https://github.com/lycheeverse/lychee/blob/master/README.md" edition = "2018" @@ -21,46 +21,51 @@ anyhow = "1.0.38" futures = "0.3.13" glob = "0.3.0" http = "0.2.3" -# Switch back to version on crates.io after 0.6.3+ is released -hubcaps = { git="https://github.com/softprops/hubcaps.git" } +hubcaps = "0.6.2" linkify = "0.5.0" -regex = "1.4.3" +regex = "1.4.5" url = "2.2.1" -# Switch back to version on crates.io after -# https://github.com/async-email/async-smtp/pull/36 -# is merged and a new version of check-if-email-exists is released -check-if-email-exists = { git="https://github.com/reacherhq/check-if-email-exists.git" } +check-if-email-exists = "0.8.19" indicatif = "0.15.0" structopt = "0.3.21" toml = "0.5.8" -serde = { version = "1.0.123", features = ["derive"] } +serde = { version = "1.0.124", features = ["derive"] } pulldown-cmark = "0.8.0" html5ever = "0.25.1" markup5ever = "0.10.0" markup5ever_rcdom = "0.1.0" -headers = "0.3.3" +headers = "0.3.4" derive_builder = "0.9.0" deadpool = "0.7.0" shellexpand = "2.1.0" lazy_static = "1.4.0" -wiremock = "0.5.0" -openssl-sys = "0.9.60" -serde_json = "1.0.62" +wiremock = "0.5.1" +openssl-sys = "0.9.61" +serde_json = "1.0.64" # Make build work on Apple Silicon. # See https://github.com/briansmith/ring/issues/1163 # This is necessary for the homebrew build # https://github.com/Homebrew/homebrew-core/pull/70216 -ring = "0.16.19" +ring = "0.16.20" pad = "0.1.6" -console = "0.14.0" +console = "0.14.1" +fast_chemail = "0.9.6" [dependencies.reqwest] features = ["gzip"] -version = "0.11.1" +version = "0.11.2" [dependencies.tokio] features = ["full"] -version = "1.2.0" +version = "1.3.0" + +[patch.crates-io] +# Switch to version on crates.io after resolving +# https://github.com/async-email/async-smtp/issues/40 and new version of +# check-if-email-exists is released +check-if-email-exists = { git = "https://github.com/reacherhq/check-if-email-exists.git" } +# Switch back to version on crates.io after 0.6.3+ is released +hubcaps = { git="https://github.com/softprops/hubcaps.git" } [dev-dependencies] assert_cmd = "1.0.3" diff --git a/README.md b/README.md index 5ae3b04..a794b60 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ -![lychee](assets/banner.png) +![lychee](assets/banner.svg) ![Rust](https://github.com/hello-rust/lychee/workflows/Rust/badge.svg) [![docs.rs](https://docs.rs/lychee/badge.svg)](https://docs.rs/lychee) -A fast, async, resource-friendly link checker written in Rust. \ -For GitHub links, it can optionally use a [`GITHUB_TOKEN`](#github-token) -to avoid getting blocked by GitHub's rate limiter. +⚡ A fast, async, resource-friendly link checker written in Rust. +Finds broken hyperlinks and mail addresses inside Markdown, HTML, reStructuredText, or any other text file or website! Available as a CLI utility and as a GitHub Action: [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action). @@ -149,7 +148,7 @@ token with no extra permissions is enough to be able to check public repos links There is an extensive list of commandline parameters to customize the behavior, see below for a full list. -```sh +```ignore USAGE: lychee [FLAGS] [OPTIONS] [--] [inputs]... @@ -164,7 +163,7 @@ FLAGS: --help Prints help information -i, --insecure Proceed for server connections considered insecure (invalid TLS) -n, --no-progress Do not show progress bar. This is recommended for non-interactive shells (e.g. for - continuos integration) + continuous integration) --skip-missing Skip missing input files (default is to error if they don't exist) -V, --version Prints version information -v, --verbose Verbose program output diff --git a/assets/banner.png b/assets/banner.png index 2e6c394..8e2128d 100644 Binary files a/assets/banner.png and b/assets/banner.png differ diff --git a/assets/banner.svg b/assets/banner.svg index d962d95..5ac62df 100644 --- a/assets/banner.svg +++ b/assets/banner.svg @@ -1,48 +1,17 @@ + height="199.90691mm" + viewBox="0 0 586.12097 199.90691" + version="1.1" + id="svg8" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> - @@ -51,84 +20,197 @@ image/svg+xml - + + + + + + + - + d="m 240.25481,-129.1122 c -5.19379,-5.62661 -1.51485,-45.01287 -1.19024,-53.77739 0,-1.19024 -0.10821,-2.27228 -0.21641,-3.46253 -0.86563,-5.19379 -7.46608,-6.60044 -10.06297,-1.51485 -6.16763,12.11884 -13.3091,53.01996 -1.29845,64.16497 2.92151,2.48869 7.24967,3.46253 10.7122,2.16408 3.13791,-1.40665 4.76097,-5.4102 2.05587,-7.57428 z" + id="path5637" /> + d="m 246.45794,-142.96231 c 2.92151,11.57782 15.90599,15.14856 23.04746,3.89534 1.51485,-2.27228 2.8133,-4.86918 4.00354,-7.24967 0.21641,4.43637 0.10821,12.44346 -2.05587,18.17827 -1.51486,4.00355 -5.73481,9.08914 -7.89889,2.4887 -0.54102,-1.73127 -1.73127,-2.81331 -3.46253,-3.02972 -2.05588,-0.1082 -3.46253,0.64923 -4.32816,2.05588 -1.40665,2.8133 -0.75743,6.05942 0.1082,9.08914 3.78714,12.76807 21.42439,11.68603 27.051,-0.97384 4.65278,-10.60399 1.08204,-28.24124 -0.86563,-37.43858 -1.73126,-7.35788 -7.89889,-6.70865 -9.95477,-0.86564 -1.51485,3.57074 -3.13791,6.60045 -4.43636,8.87273 -12.33526,21.5326 -8.0071,-8.87273 -1.94767,-17.31264 2.9215,-4.32816 -3.13792,-8.33171 -9.41375,-5.08559 -8.1153,3.89535 -12.55167,17.09624 -9.84657,27.37562 z" + id="path5639" /> - - + d="m 310.31014,-164.2785 c 1.40666,-3.02971 5.51841,-8.22351 5.84302,-5.19379 0.75743,6.81685 8.65632,7.03326 9.30554,-2.27229 0.21641,-2.8133 -0.2164,-4.97738 -1.29844,-6.70865 -2.92151,-4.65277 -8.54812,-5.73481 -13.85012,-4.54456 -7.79068,1.73126 -13.41729,8.87272 -16.2306,16.447 -3.78714,9.95477 -3.35432,22.18182 1.40665,31.37916 6.81686,12.98448 21.4244,12.33526 26.29358,-2.59689 1.08204,-3.35433 1.73126,-6.81685 2.05587,-9.73836 0.43282,-5.302 -5.08558,-6.92506 -6.38403,-1.08204 -1.94767,20.55876 -8.76453,14.28293 -10.06297,2.27228 -0.64923,-6.70865 -0.43282,-10.8204 2.9215,-17.96186 z" + id="path5641" /> + d="m 349.39207,-129.97783 c 0.86564,-2.16408 3.24612,-22.50644 8.22351,-19.26032 5.19379,3.46253 2.59689,14.28293 4.54457,19.69313 2.27228,6.16763 10.8204,5.302 9.84656,-0.43281 -1.29845,-7.46608 -0.54102,-15.25677 -3.78714,-22.50644 -3.57073,-7.89889 -12.55166,-8.43991 -17.63725,-2.27228 -4.11175,4.97738 -4.21996,5.302 -4.32816,0.97384 0,-9.84657 0.21641,-19.47672 1.08204,-29.86431 0,-9.08914 -8.0071,-9.30554 -11.46963,-1.51485 -3.24612,7.46607 -7.46607,35.3827 -2.9215,51.3969 1.29844,4.32816 3.57073,10.38758 9.30554,9.73836 2.92151,-0.21641 5.84302,-2.38049 7.14146,-5.95122 z" + id="path5643" /> - - - lychee - Introducing the glorious + d="m 391.5426,-144.47717 c 6.92505,2.38049 14.49933,-3.78714 15.68958,-10.8204 3.89534,-20.77517 -20.66697,-19.36852 -26.9428,-2.48869 -3.13792,8.54811 -2.5969,18.17827 1.29845,24.99512 6.70865,11.79424 18.61109,9.84657 25.64435,-2.7051 2.48869,-4.32816 -1.08204,-10.38758 -4.76098,-3.35432 -4.54457,7.89889 -13.95831,11.03681 -10.9286,-5.62661 z m 1.08204,-6.38404 c 0.54102,-5.4102 4.76097,-14.06652 7.89889,-13.20088 4.32816,4.65277 -0.21641,12.55166 -7.89889,13.20088 z m 31.92018,6.16763 c 8.65632,0.43282 13.6337,-8.43991 11.79423,-16.77162 -0.86563,-3.89534 -3.57073,-8.43991 -8.87272,-8.33171 -4.97739,0.32462 -9.41375,4.00355 -11.46963,8.87273 -3.46253,7.79069 -4.65277,20.88337 -0.32461,28.78227 4.86918,9.08913 16.98803,9.08913 20.55876,-2.27229 0.75743,-2.48869 1.19024,-5.30199 1.40665,-7.79069 0.64923,-4.11175 -4.54457,-4.32816 -5.4102,-0.75742 -0.75743,2.9215 -1.19024,4.65277 -1.94767,7.24966 -2.8133,6.81686 -6.81685,-1.94767 -5.73481,-8.98093 z m 0.54102,-6.70865 c 1.08204,-4.11175 2.59689,-7.79068 4.65277,-10.9286 3.67894,2.92151 1.94767,10.9286 -4.65277,10.9286 z" + id="path5645" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/banner_raw.svg b/assets/banner_raw.svg new file mode 100644 index 0000000..383ac00 --- /dev/null +++ b/assets/banner_raw.svg @@ -0,0 +1,205 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + lychee + Introducing the glorious + + + + + + + + + + + + + + + + + + + + diff --git a/src/bin/lychee/main.rs b/src/bin/lychee/main.rs index 28a14e7..9d54eef 100644 --- a/src/bin/lychee/main.rs +++ b/src/bin/lychee/main.rs @@ -175,7 +175,12 @@ async fn run(cfg: &Config, inputs: Vec) -> Result { if let Some(output) = &cfg.output { fs::write(output, stats_formatted).context("Cannot write status output to file")?; } else { - println!("\n{}", stats_formatted); + if cfg.verbose && !stats.is_empty() { + // separate summary from the verbose list of links above + println!(); + } + // we assume that the formatted stats don't have a final newline + println!("{}", stats_formatted); } match stats.is_success() { diff --git a/src/bin/lychee/options.rs b/src/bin/lychee/options.rs index 912cd96..8376541 100644 --- a/src/bin/lychee/options.rs +++ b/src/bin/lychee/options.rs @@ -117,7 +117,7 @@ pub struct Config { pub verbose: bool, /// Do not show progress bar. - /// This is recommended for non-interactive shells (e.g. for continuos + /// This is recommended for non-interactive shells (e.g. for continuous /// integration) #[structopt(short, long)] #[serde(default)] diff --git a/src/bin/lychee/stats.rs b/src/bin/lychee/stats.rs index 5e0446d..9cf73b1 100644 --- a/src/bin/lychee/stats.rs +++ b/src/bin/lychee/stats.rs @@ -17,9 +17,8 @@ pub fn color_response(response: &Response) -> String { Status::Ok(_) => style(response).green().bright(), Status::Redirected(_) => style(response), Status::Excluded => style(response).dim(), - Status::Error(_) => style(response).yellow().bright(), Status::Timeout(_) => style(response).yellow().bright(), - Status::Failed(_) => style(response).red().bright(), + Status::Error(_, _) => style(response).red().bright(), }; out.to_string() } @@ -54,17 +53,16 @@ impl ResponseStats { pub fn add(&mut self, response: Response) { self.total += 1; match response.status { - Status::Failed(_) => self.failures += 1, + Status::Error(_, _) => self.failures += 1, Status::Timeout(_) => self.timeouts += 1, Status::Redirected(_) => self.redirects += 1, Status::Excluded => self.excludes += 1, - Status::Error(_) => self.errors += 1, _ => self.successful += 1, } if matches!( response.status, - Status::Failed(_) | Status::Timeout(_) | Status::Redirected(_) | Status::Error(_) + Status::Error(_, _) | Status::Timeout(_) | Status::Redirected(_) ) { let fail = self.fail_map.entry(response.source.clone()).or_default(); fail.insert(response); @@ -74,9 +72,13 @@ impl ResponseStats { pub fn is_success(&self) -> bool { self.total == self.successful + self.excludes } + + pub fn is_empty(&self) -> bool { + self.total == 0 + } } -fn write_stat(f: &mut fmt::Formatter, title: &str, stat: usize) -> fmt::Result { +fn write_stat(f: &mut fmt::Formatter, title: &str, stat: usize, newline: bool) -> fmt::Result { let fill = title.chars().count(); f.write_str(title)?; f.write_str( @@ -84,7 +86,12 @@ fn write_stat(f: &mut fmt::Formatter, title: &str, stat: usize) -> fmt::Result { .to_string() .pad(MAX_PADDING - fill, '.', Alignment::Right, false), )?; - f.write_str("\n") + + if newline { + f.write_str("\n")?; + } + + Ok(()) } impl Display for ResponseStats { @@ -93,24 +100,23 @@ impl Display for ResponseStats { writeln!(f, "📝 Summary")?; writeln!(f, "{}", separator)?; - write_stat(f, "🔍 Total", self.total)?; - write_stat(f, "✅ Successful", self.successful)?; - write_stat(f, "⏳ Timeouts", self.timeouts)?; - write_stat(f, "🔀 Redirected", self.redirects)?; - write_stat(f, "👻 Excluded", self.excludes)?; - write_stat(f, "🚫 Errors", self.errors + self.failures)?; + write_stat(f, "🔍 Total", self.total, true)?; + write_stat(f, "✅ Successful", self.successful, true)?; + write_stat(f, "⏳ Timeouts", self.timeouts, true)?; + write_stat(f, "🔀 Redirected", self.redirects, true)?; + write_stat(f, "👻 Excluded", self.excludes, true)?; + write_stat(f, "🚫 Errors", self.errors + self.failures, false)?; - if !&self.fail_map.is_empty() { - writeln!(f)?; - } for (input, responses) in &self.fail_map { - writeln!(f, "Errors in {}", input)?; + // Using leading newlines over trailing ones (e.g. `writeln!`) + // lets us avoid extra newlines without any additional logic. + write!(f, "\n\nErrors in {}", input)?; for response in responses { - writeln!(f, "{}", color_response(response))? + write!(f, "\n{}", color_response(response))? } - writeln!(f)?; } - writeln!(f) + + Ok(()) } } @@ -120,6 +126,20 @@ mod test_super { use super::*; + #[test] + fn test_stats_is_empty() { + let mut stats = ResponseStats::new(); + assert!(stats.is_empty()); + + stats.add(Response { + uri: website("http://example.org/ok"), + status: Status::Ok(http::StatusCode::OK), + source: Input::Stdin, + }); + + assert!(!stats.is_empty()); + } + #[test] fn test_stats() { let mut stats = ResponseStats::new(); @@ -130,7 +150,7 @@ mod test_super { }); stats.add(Response { uri: website("http://example.org/failed"), - status: Status::Failed(http::StatusCode::BAD_GATEWAY), + status: Status::Error("".to_string(), Some(http::StatusCode::BAD_GATEWAY)), source: Input::Stdin, }); stats.add(Response { @@ -144,7 +164,7 @@ mod test_super { vec![ Response { uri: website("http://example.org/failed"), - status: Status::Failed(http::StatusCode::BAD_GATEWAY), + status: Status::Error("".to_string(), Some(http::StatusCode::BAD_GATEWAY)), source: Input::Stdin, }, Response { diff --git a/src/client.rs b/src/client.rs index 6fe0757..b696091 100644 --- a/src/client.rs +++ b/src/client.rs @@ -194,7 +194,7 @@ impl Client { // TODO: We should not be using a HTTP status code for mail match self.check_mail(&address).await { true => Status::Ok(http::StatusCode::OK), - false => Status::Error(format!("Invalid mail address: {}", address)), + false => Status::Error(format!("Invalid mail address: {}", address), None), } } }) @@ -232,7 +232,7 @@ impl Client { Some(github) => { let repo = github.repo(owner, repo).get().await; match repo { - Err(e) => Status::Error(format!("{}", e)), + Err(e) => Status::Error(e.to_string(), None), Ok(_) => Status::Ok(http::StatusCode::OK), } } @@ -240,6 +240,7 @@ impl Client { "GitHub token not specified. To check GitHub links reliably, \ use `--github-token` flag / `GITHUB_TOKEN` env var." .to_string(), + None, ), } } @@ -297,7 +298,6 @@ pub async fn check>(request: T) -> Result { #[cfg(test)] mod test { use super::*; - use http::StatusCode; use std::time::{Duration, Instant}; use wiremock::matchers::method; use wiremock::{Mock, MockServer, ResponseTemplate}; @@ -317,7 +317,18 @@ mod test { .check(mock_server.uri()) .await .unwrap(); - assert!(matches!(res.status, Status::Failed(_))); + assert!(res.status.is_failure()); + } + + #[tokio::test] + async fn test_nonexistent_with_path() { + let res = ClientBuilder::default() + .build() + .unwrap() + .check("http://127.0.0.1/invalid") + .await + .unwrap(); + assert!(res.status.is_failure()); } #[tokio::test] @@ -338,7 +349,7 @@ mod test { .unwrap(); let end = start.elapsed(); - assert!(matches!(res.status, Status::Failed(_))); + assert!(matches!(res.status, Status::Error(_, _))); // on slow connections, this might take a bit longer than nominal backed-off timeout (7 secs) assert!(end.as_secs() >= 7); @@ -358,16 +369,14 @@ mod test { } #[tokio::test] async fn test_github() { - assert!(matches!( - ClientBuilder::default() - .build() - .unwrap() - .check("https://github.com/lycheeverse/lychee") - .await - .unwrap() - .status, - Status::Ok(_) - )); + assert!(ClientBuilder::default() + .build() + .unwrap() + .check("https://github.com/lycheeverse/lychee") + .await + .unwrap() + .status + .is_success()); } #[tokio::test] @@ -379,7 +388,7 @@ mod test { .await .unwrap() .status; - assert!(matches!(res, Status::Error(_))); + assert!(res.is_failure()); } #[tokio::test] @@ -398,7 +407,7 @@ mod test { .await .unwrap() .status; - assert!(matches!(res, Status::Ok(_))); + assert!(res.is_success()); } #[tokio::test] @@ -409,7 +418,7 @@ mod test { .check("https://expired.badssl.com/") .await .unwrap(); - assert!(matches!(res.status, Status::Error(_))); + assert!(res.status.is_failure()); // Same, but ignore certificate error let res = ClientBuilder::default() @@ -419,7 +428,7 @@ mod test { .check("https://expired.badssl.com/") .await .unwrap(); - assert!(matches!(res.status, Status::Ok(_))); + assert!(res.status.is_success()); } #[tokio::test] @@ -430,7 +439,7 @@ mod test { .check("https://crates.io/crates/lychee") .await .unwrap(); - assert!(matches!(res.status, Status::Failed(StatusCode::NOT_FOUND))); + assert!(res.status.is_failure()); // Try again, but with a custom header. // For example, crates.io requires a custom accept header. @@ -444,7 +453,7 @@ mod test { .check("https://crates.io/crates/lychee") .await .unwrap(); - assert!(matches!(res.status, Status::Ok(_))); + assert!(res.status.is_success()); } #[tokio::test] diff --git a/src/extract.rs b/src/extract.rs index 020b6c7..19969fd 100644 --- a/src/extract.rs +++ b/src/extract.rs @@ -498,4 +498,27 @@ mod test { assert_eq!(links, expected_links); } + + #[test] + fn test_extract_urls_with_at_sign_properly() { + // note that these used to parse as emails + let input = "https://example.com/@test/test http://otherdomain.com/test/@test".to_string(); + let links: HashSet = extract_links( + &InputContent::from_string(&input, FileType::Plaintext), + None, + ) + .into_iter() + .map(|r| r.uri) + .collect(); + + let expected_links = [ + website("https://example.com/@test/test"), + website("http://otherdomain.com/test/@test"), + ] + .iter() + .cloned() + .collect(); + + assert_eq!(links, expected_links); + } } diff --git a/src/filter/excludes.rs b/src/filter/excludes.rs index 118a541..52aab15 100644 --- a/src/filter/excludes.rs +++ b/src/filter/excludes.rs @@ -1,18 +1,23 @@ +use lazy_static::lazy_static; use regex::RegexSet; use std::net::IpAddr; use crate::Uri; +/// Pre-defined exclusions for known false-positives +static FALSE_POSITIVE_REGEX: &[&str] = &[r"http://www.w3.org/1999/xhtml"]; + /// Exclude configuration for the link checker. /// You can ignore links based on regex patterns or pre-defined IP ranges. #[derive(Clone, Debug)] pub struct Excludes { + /// User-defined set of excluded regex patterns pub regex: Option, /// Example: 192.168.0.1 pub private_ips: bool, /// Example: 169.254.0.0 pub link_local_ips: bool, - /// For IPv4: 127.0. 0.1/8 + /// For IPv4: 127.0.0.1/8 /// For IPv6: ::1/128 pub loopback_ips: bool, /// Example: octocat@github.com @@ -41,6 +46,13 @@ impl Excludes { false } + pub fn false_positive(&self, input: &str) -> bool { + lazy_static! { + static ref FALSE_POSITIVES: RegexSet = RegexSet::new(FALSE_POSITIVE_REGEX).unwrap(); + } + FALSE_POSITIVES.is_match(input) + } + pub fn ip(&self, uri: &Uri) -> bool { if let Some(ipaddr) = uri.host_ip() { if self.loopback_ips && ipaddr.is_loopback() { diff --git a/src/filter/mod.rs b/src/filter/mod.rs index adc0f3a..63e92a0 100644 --- a/src/filter/mod.rs +++ b/src/filter/mod.rs @@ -39,7 +39,7 @@ impl Filter { pub fn excluded(&self, request: &Request) -> bool { // Skip mail? - if matches!(request.uri, Uri::Mail(_)) && self.excludes.is_mail_excluded() { + if self.excludes.is_mail_excluded() && matches!(request.uri, Uri::Mail(_)) { return true; } // Skip specific IP address? @@ -48,23 +48,29 @@ impl Filter { } // No regex includes/excludes at all? if self.includes.is_empty() && self.excludes.is_empty() { + // Not excluded unless it's a known false positive + return self.excludes.false_positive(request.uri.as_str()); + } + // Includes take precedence over excludes + if self.includes.regex(request.uri.as_str()) { return false; } - if self.includes.regex(request.uri.as_str()) { - // Includes take precedence over excludes - return false; + // Exclude well-known false-positives. + // This is done after checking includes to allow for user overwrites. + if self.excludes.false_positive(request.uri.as_str()) { + return true; } // In case we have includes and no excludes, // skip everything that was not included if !self.includes.is_empty() && self.excludes.is_empty() { return true; } - - // We have no includes. Check regex excludes + // We have no includes. Check regex excludes. + // This includes well-known false positives. if self.excludes.regex(request.uri.as_str()) { return true; } - + // URI scheme excluded? if self.scheme.is_none() { return false; } @@ -144,6 +150,31 @@ mod test { assert_eq!(filter.excluded(&request("https://example.org")), false); } + #[test] + fn test_false_positives() { + let includes = Some(Includes::default()); + let excludes = Some(Excludes::default()); + let filter = Filter::new(includes, excludes, None); + assert_eq!( + filter.excluded(&request("http://www.w3.org/1999/xhtml")), + true + ); + assert_eq!(filter.excluded(&request("https://example.org")), false); + } + + #[test] + fn test_overwrite_false_positives() { + let includes = Some(Includes { + regex: Some(RegexSet::new(&[r"http://www.w3.org/1999/xhtml"]).unwrap()), + }); + let excludes = Some(Excludes::default()); + let filter = Filter::new(includes, excludes, None); + assert_eq!( + filter.excluded(&request("http://www.w3.org/1999/xhtml")), + false + ); + } + #[test] fn test_include_regex() { let includes = Some(Includes { diff --git a/src/types.rs b/src/types.rs index 935174d..19af772 100644 --- a/src/types.rs +++ b/src/types.rs @@ -78,11 +78,17 @@ impl Response { impl Display for Response { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let metadata = match &self.status { - Status::Ok(code) | Status::Redirected(code) | Status::Failed(code) => { + Status::Ok(code) | Status::Redirected(code) => { format!(" [{}]", code) } Status::Timeout(code) if code.is_some() => format!(" [{}]", code.unwrap()), - Status::Error(e) => format!(" ({})", e), + Status::Error(e, code) => { + if let Some(code) = code { + format!(" ({})", code) + } else { + format!(" ({})", e) + } + } _ => "".to_string(), }; write!(f, "{} {}{}", self.status.icon(), self.uri, metadata) @@ -95,15 +101,13 @@ pub enum Status { /// Request was successful Ok(http::StatusCode), /// Request failed with HTTP error code - Failed(http::StatusCode), + Error(String, Option), /// Request timed out Timeout(Option), /// Got redirected to different resource Redirected(http::StatusCode), /// Resource was excluded from checking Excluded, - /// Low-level error while loading resource - Error(String), } impl Display for Status { @@ -112,8 +116,13 @@ impl Display for Status { Status::Ok(c) => format!("OK ({})", c), Status::Redirected(c) => format!("Redirect ({})", c), Status::Excluded => "Excluded".to_string(), - Status::Failed(c) => format!("Failed ({})", c), - Status::Error(e) => format!("Runtime error ({})", e), + Status::Error(err, code) => { + if let Some(code) = code { + format!("Failed: {} ({})", err, code) + } else { + format!("Failed: {}", err) + } + } Status::Timeout(Some(c)) => format!("Timeout ({})", c), Status::Timeout(None) => "Timeout".to_string(), }; @@ -139,7 +148,7 @@ impl Status { } else if statuscode.is_redirection() { Status::Redirected(statuscode) } else { - Status::Failed(statuscode) + Status::Error("".into(), Some(statuscode)) } } @@ -147,6 +156,10 @@ impl Status { matches!(self, Status::Ok(_)) } + pub fn is_failure(&self) -> bool { + matches!(self, Status::Error(_, _)) + } + pub fn is_excluded(&self) -> bool { matches!(self, Status::Excluded) } @@ -156,8 +169,7 @@ impl Status { Status::Ok(_) => "✔", Status::Redirected(_) => "⇄️", Status::Excluded => "?", - Status::Failed(_) => "✗", - Status::Error(_) => "↯", + Status::Error(_, _) => "✗", Status::Timeout(_) => "⧖", } } @@ -168,7 +180,7 @@ impl From for Status { if e.is_timeout() { Status::Timeout(e.status()) } else { - Status::Error(e.to_string()) + Status::Error(e.to_string(), e.status()) } } } diff --git a/src/uri.rs b/src/uri.rs index 57ff67c..7fa34ea 100644 --- a/src/uri.rs +++ b/src/uri.rs @@ -1,4 +1,5 @@ use anyhow::{bail, Result}; +use fast_chemail::is_valid_email; use serde::{Deserialize, Serialize}; use std::net::IpAddr; use std::{convert::TryFrom, fmt::Display}; @@ -56,12 +57,12 @@ impl TryFrom<&str> for Uri { // Remove the `mailto` scheme if it exists // to avoid parsing it as a website URL. let s = s.trim_start_matches("mailto:"); - if s.contains('@') & !is_link_internal { - return Ok(Uri::Mail(s.to_string())); - } + if let Ok(uri) = Url::parse(s) { return Ok(Uri::Website(uri)); - }; + } else if !is_link_internal && is_valid_email(&s) { + return Ok(Uri::Mail(s.to_string())); + } bail!("Cannot convert to Uri") } } @@ -86,6 +87,10 @@ mod test { Uri::try_from("http://example.org").unwrap(), website("http://example.org") ); + assert_eq!( + Uri::try_from("http://example.org/@test/testing").unwrap(), + website("http://example.org/@test/testing") + ); assert_eq!( Uri::try_from("mail@example.org").unwrap(), Uri::Mail("mail@example.org".to_string()) diff --git a/tests/usage.rs b/tests/usage.rs index 9455dd9..8080b93 100644 --- a/tests/usage.rs +++ b/tests/usage.rs @@ -41,13 +41,13 @@ mod readme { .expect("Invalid utf8 output for `--help`"); let readme = load_readme_text(); - const BACKTICKS_OFFSET: usize = 5; // marker: ```sh + const BACKTICKS_OFFSET: usize = 9; // marker: ```ignore const NEWLINE_OFFSET: usize = 1; let usage_start = BACKTICKS_OFFSET + NEWLINE_OFFSET + readme - .find("```sh\nUSAGE:\n") + .find("```ignore\nUSAGE:\n") .expect("Couldn't find USAGE section in README.md"); let usage_end = readme[usage_start..]