From f15837aef1062d05605639e0a8fc31291f06ac57 Mon Sep 17 00:00:00 2001 From: Wenxuan Zhang Date: Sun, 5 Jan 2025 21:22:44 +0800 Subject: [PATCH] feat: bump up dependencies --- .github/stale.yml | 17 +- .github/workflows/CICD.yml | 11 +- .pre-commit-config.yaml | 2 +- .rustfmt.toml | 6 - Cargo.lock | 1847 ++++++++++++++++------------ Cargo.toml | 40 +- build.rs | 24 +- rust-toolchain.toml | 3 + rustfmt.toml | 13 + src/engine/bing.rs | 40 +- src/engine/mod.rs | 12 +- src/engine/youdao.rs | 17 +- src/main.rs | 9 +- src/translation.rs | 35 +- tests/engine/bing/mod.rs | 236 ++-- tests/engine/bing/test_data.json | 249 ++-- tests/engine/youdao/mod.rs | 370 ++++-- tests/engine/youdao/test_data.json | 386 ++++-- 18 files changed, 2013 insertions(+), 1304 deletions(-) delete mode 100644 .rustfmt.toml create mode 100644 rust-toolchain.toml create mode 100644 rustfmt.toml diff --git a/.github/stale.yml b/.github/stale.yml index 820f633..7e9f73a 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,18 +1,19 @@ +--- # Number of days of inactivity before an issue becomes stale -daysUntilStale: 90 +daysUntilStale: 180 # Number of days of inactivity before a stale issue is closed -daysUntilClose: 30 +daysUntilClose: -1 # Issues with these labels will never be considered stale exemptLabels: - - pinned - - security - - bug + - pinned + - security + - bug # Label to use when marking an issue as stale staleLabel: stale # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. # Comment to post when closing a stale issue. Set to `false` to disable closeComment: false diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 9129920..31839d3 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -16,10 +16,13 @@ jobs: fail-fast: false matrix: job: - - { os: ubuntu-latest , target: x86_64-unknown-linux-musl, features: "" } - - { os: ubuntu-latest , target: x86_64-unknown-linux-gnu , features: "full" } - - { os: macos-latest , target: x86_64-apple-darwin , features: "full" } - - { os: windows-latest , target: x86_64-pc-windows-msvc , features: "full" } + - { os: ubuntu-latest, target: x86_64-unknown-linux-musl, features: "" } + - { os: ubuntu-latest, target: x86_64-unknown-linux-gnu, features: "full" } + - { os: macos-latest, target: x86_64-apple-darwin, features: "full" } + - { os: windows-latest, target: x86_64-pc-windows-msvc, features: "full" } + - { os: macos-13, target: x86_64-apple-darwin, features: "full" } + - { os: macos-latest, target: aarch64-apple-darwin, features: "full" } + steps: - name: Git checkout uses: actions/checkout@v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c40b736..9406443 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v5.0.0 hooks: - id: check-yaml - id: check-added-large-files diff --git a/.rustfmt.toml b/.rustfmt.toml deleted file mode 100644 index e45230f..0000000 --- a/.rustfmt.toml +++ /dev/null @@ -1,6 +0,0 @@ -edition = "2018" -struct_field_align_threshold = 40 -max_width = 120 -comment_width = 120 -reorder_imports = true -fn_single_line = false diff --git a/Cargo.lock b/Cargo.lock index 8a8cc34..fbbda11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,26 +1,26 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "aho-corasick" -version = "0.7.15" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "alsa" -version = "0.6.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5915f52fe2cf65e83924d037b6c5290b7cee097c6b5c8700746e6168a343fd6b" +checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" dependencies = [ "alsa-sys", - "bitflags", + "bitflags 2.6.0", + "cfg-if", "libc", - "nix 0.23.1", ] [[package]] @@ -35,24 +35,30 @@ dependencies = [ [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ "winapi", ] [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "async-channel" -version = "1.6.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", "event-listener", @@ -72,27 +78,26 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bindgen" -version = "0.56.0" +version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da379dbebc0b76ef63ca68d8fc6e71c0f13e59432e0987e508c1820e6ab5239" +checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags", + "bitflags 2.6.0", "cexpr", "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", + "itertools 0.13.0", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", + "syn 2.0.95", ] [[package]] @@ -101,43 +106,51 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + [[package]] name = "bumpalo" -version = "3.6.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] -name = "byteorder" -version = "1.4.3" +name = "bytemuck" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" [[package]] -name = "bytes" -version = "1.0.1" +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "cache-padded" -version = "1.1.1" +name = "bytes" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "castaway" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed247d1586918e46f2bbe0f13b06498db8dab5a8c1093f156652e9f2e0a73fc3" +checksum = "a2698f953def977c68f935bb0dfa959375ad4638570e969e2f1e9f433cbf1af6" [[package]] name = "cc" -version = "1.0.67" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" +checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ "jobserver", + "libc", + "shlex", ] [[package]] @@ -148,9 +161,9 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cexpr" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" +checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" dependencies = [ "nom", ] @@ -161,11 +174,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "clang-sys" -version = "1.1.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54d78e30b388d4815220c8dd03fea5656b6c6d32adb59e89061552a102f8da1" +checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", @@ -174,16 +193,16 @@ dependencies = [ [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", - "bitflags", + "bitflags 1.3.2", "term_size", "textwrap", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] @@ -194,13 +213,11 @@ checksum = "4bfbf56724aa9eca8afa4fcfadeb479e722935bb2a0900c2d37e0cc477af0688" [[package]] name = "clipboard-win" -version = "4.2.1" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4ea1881992efc993e4dc50a324cdbd03216e41bdc8385720ff47efc9bd2ca8" +checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" dependencies = [ "error-code", - "str-buf 1.0.5", - "winapi", ] [[package]] @@ -211,7 +228,7 @@ dependencies = [ "cfg-if", "colored", "isahc", - "itertools", + "itertools 0.14.0", "lazy_static", "quote", "regex", @@ -227,20 +244,19 @@ dependencies = [ [[package]] name = "colored" -version = "2.0.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ - "atty", "lazy_static", - "winapi", + "windows-sys 0.59.0", ] [[package]] name = "combine" -version = "4.5.2" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4369b5e4c0cddf64ad8981c0111e7df4f7078f4d6ba98fb31f2e17c4c57b7e" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ "bytes", "memchr", @@ -248,112 +264,96 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "1.2.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ - "cache-padded", + "crossbeam-utils", ] [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "coreaudio-rs" -version = "0.10.0" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11894b20ebfe1ff903cbdc52259693389eea03b94918a2def2c30c3bf227ad88" +checksum = "321077172d79c662f64f5071a03120748d5bb652f5231570141be24cfcd2bace" dependencies = [ - "bitflags", + "bitflags 1.3.2", + "core-foundation-sys", "coreaudio-sys", ] [[package]] name = "coreaudio-sys" -version = "0.2.8" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b7e3347be6a09b46aba228d6608386739fb70beff4f61e07422da87b0bb31fa" +checksum = "2ce857aa0b77d77287acc1ac3e37a05a8c95a2af3647d23b15f263bdaeb7562b" dependencies = [ "bindgen", ] [[package]] name = "cpal" -version = "0.14.0" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d466b47cf0ea4100186a7c12d7d0166813dda7cf648553554c9c39c6324841b" +checksum = "873dab07c8f743075e57f524c583985fbaf745602acbe916a01539364369a779" dependencies = [ "alsa", "core-foundation-sys", "coreaudio-rs", + "dasp_sample", "jni", "js-sys", "libc", - "mach", - "ndk 0.7.0", + "mach2", + "ndk", "ndk-context", - "nix 0.23.1", "oboe", - "once_cell", - "parking_lot", - "stdweb", - "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", "web-sys", "windows", ] [[package]] name = "crossbeam-utils" -version = "0.8.3" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" -dependencies = [ - "autocfg", - "cfg-if", - "lazy_static", -] +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "cssparser" -version = "0.27.2" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a" +checksum = "b7c66d1cd8ed61bf80b38432613a7a2f09401ab8d0501110655f8b341484a3e3" dependencies = [ "cssparser-macros", "dtoa-short", - "itoa 0.4.7", - "matches", - "phf 0.8.0", - "proc-macro2", - "quote", + "itoa", + "phf", "smallvec", - "syn", ] [[package]] name = "cssparser-macros" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" +checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn", + "syn 2.0.95", ] -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - [[package]] name = "curl" -version = "0.4.37" +version = "0.4.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adba2012502267c1fdde381e0e3acc44bf8be96b2f7d455089dcc2c8ad2f67bd" +checksum = "d9fb4d13a1be2b58f14d60adba57c9834b78c62fd86c3e76a148f732686e9265" dependencies = [ "curl-sys", "libc", @@ -361,14 +361,14 @@ dependencies = [ "openssl-sys", "schannel", "socket2", - "winapi", + "windows-sys 0.52.0", ] [[package]] name = "curl-sys" -version = "0.4.55+curl-7.83.1" +version = "0.4.78+curl-8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23734ec77368ec583c2e61dd3f0b0e5c98b93abe6d2a004ca06b91dd7e3e2762" +checksum = "8eec768341c5c7789611ae51cf6c459099f22e64a5d5d0ce4892434e33821eaf" dependencies = [ "cc", "libc", @@ -376,73 +376,69 @@ dependencies = [ "openssl-sys", "pkg-config", "vcpkg", - "winapi", + "windows-sys 0.52.0", ] [[package]] -name = "derive_more" -version = "0.99.11" +name = "dasp_sample" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] +checksum = "0c87e182de0887fd5361989c677c4e8f5000cd9491d6d563161a8f3a5519fc7f" [[package]] -name = "dirs-next" -version = "2.0.0" +name = "derive_more" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ - "cfg-if", - "dirs-sys-next", + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "displaydoc" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ - "libc", - "redox_users", - "winapi", + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] name = "dtoa" -version = "0.4.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d7ed2934d741c6b37e33e3832298e8850b53fd2d2bea03873375596c7cea4e" +checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" [[package]] name = "dtoa-short" -version = "0.3.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" dependencies = [ "dtoa", ] [[package]] name = "ego-tree" -version = "0.6.2" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68a4904193147e0a8dec3314640e6db742afd5f6e634f428a6af230d9b3591" +checksum = "b2972feb8dffe7bc8c5463b1dacda1b0dfbed3710e50f977d965429692d74cd8" [[package]] name = "either" -version = "1.6.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encoding_rs" -version = "0.8.28" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] @@ -454,39 +450,51 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] -name = "error-code" -version = "2.2.0" +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d4871041f3339e2cd4a23c698f89519e1ca62aa73190eddcc18dde4ee11e8ff" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "str-buf 2.0.0", + "windows-sys 0.59.0", ] +[[package]] +name = "error-code" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d9305ccc6942a704f4335694ecd3de2ea531b114ac2d51f5f843750787a92f" + [[package]] name = "event-listener" -version = "2.5.1" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "1.4.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca5faf057445ce5c9d4329e382b2ce7ca38550ef3b73a5348362d5f24e0c7fe3" +checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" dependencies = [ "instant", ] [[package]] name = "fd-lock" -version = "3.0.0" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8806dd91a06a7a403a8e596f9bfbfb34e469efbc363fc9c9713e79e26472e36" +checksum = "7e5768da2206272c81ef0b5e951a41862938a6070da63bcea197899942d3b947" dependencies = [ "cfg-if", - "libc", - "winapi", + "rustix", + "windows-sys 0.52.0", ] [[package]] @@ -497,49 +505,40 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] [[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", ] -[[package]] -name = "futures-channel" -version = "0.3.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2dd2df839b57db9ab69c2c9d8f3e8c81984781937fe2807dc6dcf3b2ad2939" -dependencies = [ - "futures-core", -] - [[package]] name = "futures-core" -version = "0.3.13" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-io" -version = "0.3.13" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-lite" -version = "1.11.3" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4481d0cd0de1d204a4fa55e7d45f07b1d958abcb06714b3446438e2eff695fb" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ "fastrand", "futures-core", @@ -565,101 +564,244 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" dependencies = [ - "unicode-width", + "unicode-width 0.1.14", ] [[package]] name = "getrandom" -version = "0.1.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi", ] [[package]] -name = "getrandom" -version = "0.2.2" +name = "glob" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.10.2+wasi-snapshot-preview1", -] +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] -name = "glob" -version = "0.3.0" +name = "hashbrown" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ "unicode-segmentation", ] [[package]] name = "hermit-abi" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ "libc", ] +[[package]] +name = "home" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +dependencies = [ + "windows-sys 0.59.0", +] + [[package]] name = "hound" -version = "3.4.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a164bb2ceaeff4f42542bdb847c41517c78a60f5649671b2a07312b6e117549" +checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" [[package]] name = "html5ever" -version = "0.26.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" +checksum = "2e15626aaf9c351bc696217cbe29cb9b5e86c43f8a46b5e2f5c6c5cf7cb904ce" dependencies = [ "log", "mac", "markup5ever", "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] name = "http" -version = "0.2.3" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ "bytes", "fnv", - "itoa 0.4.7", + "itoa", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] name = "idna" -version = "0.3.0" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "equivalent", + "hashbrown", ] [[package]] name = "instant" -version = "0.1.9" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -693,37 +835,42 @@ dependencies = [ [[package]] name = "itertools" -version = "0.10.4" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8bf247779e67a9082a4790b45e71ac7cfd1321331a5c856a74a9faebdab78d0" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] -name = "itoa" -version = "0.4.7" +name = "itertools" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +dependencies = [ + "either", +] [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jni" -version = "0.19.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", + "cfg-if", "combine", "jni-sys", "log", "thiserror", "walkdir", + "windows-sys 0.45.0", ] [[package]] @@ -734,33 +881,28 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "jobserver" -version = "0.1.24" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af25a77299a7f711a01975c35a6a424eb6862092cc2d6c72c4ed6cbc56dfc1fa" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.48" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc9f84f9b115ce7843d60706df1422a916680bfdfcbdb0447c5614ff9d7e4d78" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "wasm-bindgen", ] [[package]] name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "lewton" @@ -775,25 +917,25 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.126" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" -version = "0.7.0" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" +checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "winapi", + "windows-targets 0.52.6", ] [[package]] name = "libz-sys" -version = "1.1.2" +version = "1.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655" +checksum = "d2d16453e800a8cf6dd2fc3eb4bc99b786a9b90c663b8559a5b1a041bf89e472" dependencies = [ "cc", "libc", @@ -801,11 +943,23 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" -version = "0.4.8" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f80bf5aacaf25cbfc8210d1cfb718f2bf3b11c4c54e5afe36c236853a8ec390" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -813,12 +967,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.14" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if", -] +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "mac" @@ -827,99 +978,57 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] -name = "mach" -version = "0.3.2" +name = "mach2" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" dependencies = [ "libc", ] [[package]] name = "markup5ever" -version = "0.11.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" +checksum = "82c88c6129bd24319e62a0359cb6b958fa7e8be6e19bb1663bc396b90883aca5" dependencies = [ "log", - "phf 0.10.1", - "phf_codegen 0.10.0", + "phf", + "phf_codegen", "string_cache", "string_cache_codegen", "tendril", ] -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - [[package]] name = "memchr" -version = "2.3.4" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "minimp3" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "985438f75febf74c392071a975a29641b420dd84431135a6e6db721de4b74372" -dependencies = [ - "minimp3-sys", - "slice-deque", - "thiserror", -] - -[[package]] -name = "minimp3-sys" -version = "0.3.2" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e21c73734c69dc95696c9ed8926a2b393171d98b3f5f5935686a26a487ab9b90" -dependencies = [ - "cc", -] +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "ndk" -version = "0.6.0" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" -dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys 0.3.0", - "num_enum", - "thiserror", -] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "ndk" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags", + "bitflags 2.6.0", "jni-sys", - "ndk-sys 0.4.0", + "log", + "ndk-sys", "num_enum", - "raw-window-handle", "thiserror", ] @@ -931,27 +1040,18 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "ndk-sys" -version = "0.4.0" +version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ "jni-sys", ] [[package]] name = "new_debug_unreachable" -version = "1.0.4" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nibble_vec" @@ -964,93 +1064,75 @@ dependencies = [ [[package]] name = "nix" -version = "0.23.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f866317acbd3a240710c63f065ffb1e4fd466259045ccb504130b7f668f35c6" +checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags", - "cc", + "bitflags 2.6.0", "cfg-if", + "cfg_aliases", "libc", - "memoffset", ] [[package]] -name = "nix" -version = "0.24.2" +name = "nom" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" -dependencies = [ - "bitflags", - "cfg-if", - "libc", -] - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "nom" -version = "5.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ "memchr", - "version_check", + "minimal-lexical", ] [[package]] name = "num-derive" -version = "0.3.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "num_enum" -version = "0.5.7" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.5.7" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] name = "oboe" -version = "0.4.6" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f63c358b4fa0fbcfefd7c8be5cfc39c08ce2389f5325687e7762a48d30a5c1" +checksum = "e8b61bebd49e5d43f5f8cc7ee2891c16e0f41ec7954d36bcb6c14c5e0de867fb" dependencies = [ "jni", - "ndk 0.6.0", + "ndk", "ndk-context", "num-derive", "num-traits", @@ -1059,9 +1141,9 @@ dependencies = [ [[package]] name = "oboe-sys" -version = "0.4.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3370abb7372ed744232c12954d920d1a40f1c4686de9e79e800021ef492294bd" +checksum = "6c8bb09a4a2b1d668170cfe0a7d5bc103f8999fb316c98099b6a9939c9f2e79d" dependencies = [ "cc", ] @@ -1077,32 +1159,31 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.14.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "openssl-probe" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.14.0+1.1.1j" +version = "300.4.1+3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055b569b5bd7e5462a1700f595c7c7d487691d73b5ce064176af7f9f0cbb80a9" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.61" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "313752393519e876837e09e1fa183ddef0be7735868dced3196f4472d536277f" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ - "autocfg", "cc", "libc", "openssl-src", @@ -1112,15 +1193,15 @@ dependencies = [ [[package]] name = "parking" -version = "2.0.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1128,171 +1209,150 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-targets 0.52.6", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "phf" -version = "0.8.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ "phf_macros", - "phf_shared 0.8.0", - "proc-macro-hack", -] - -[[package]] -name = "phf" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" -dependencies = [ - "phf_shared 0.10.0", + "phf_shared 0.11.2", ] [[package]] name = "phf_codegen" -version = "0.8.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" +checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", + "phf_generator 0.11.2", + "phf_shared 0.11.2", ] [[package]] -name = "phf_codegen" +name = "phf_generator" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" +checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" dependencies = [ - "phf_generator 0.10.0", "phf_shared 0.10.0", + "rand", ] [[package]] name = "phf_generator" -version = "0.8.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "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", + "phf_shared 0.11.2", + "rand", ] [[package]] name = "phf_macros" -version = "0.8.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", - "proc-macro-hack", + "phf_generator 0.11.2", + "phf_shared 0.11.2", "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] name = "phf_shared" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ "siphasher", ] [[package]] name = "phf_shared" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", ] [[package]] name = "pin-project" -version = "1.0.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" +checksum = "be57f64e946e500c8ee36ef6331845d40a93055567ec57e8fae13efd33759b95" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b" +checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] name = "pin-project-lite" -version = "0.2.6" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc0e1f259c92177c30a4c9d177246edd0a3568b25756a977d0632cf8fa37e905" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polling" -version = "2.0.3" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fc12d774e799ee9ebae13f4076ca003b40d18a11ac0f3641e6f899618580b7b" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ + "autocfg", + "bitflags 1.3.2", "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-sys", - "winapi", + "pin-project-lite", + "windows-sys 0.48.0", ] [[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" @@ -1302,13 +1362,11 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "once_cell", - "thiserror", - "toml", + "toml_edit", ] [[package]] @@ -1320,7 +1378,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -1335,26 +1393,20 @@ dependencies = [ "version_check", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - [[package]] name = "proc-macro2" -version = "1.0.40" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd96a1e8ed2596c337f8eae5f24924ec83f5ad5ab21ea8e455d3566c69fbcaf7" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -1369,20 +1421,6 @@ dependencies = [ "nibble_vec", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", - "rand_pcg", -] - [[package]] name = "rand" version = "0.8.5" @@ -1390,18 +1428,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -1411,78 +1439,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", + "rand_core", ] [[package]] name = "rand_core" -version = "0.5.1" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom 0.2.2", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "raw-window-handle" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", + "getrandom", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags", + "bitflags 2.6.0", ] [[package]] -name = "redox_users" -version = "0.4.0" +name = "regex" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ - "getrandom 0.2.2", - "redox_syscall", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] -name = "regex" -version = "1.4.6" +name = "regex-automata" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1491,21 +1485,21 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.23" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5f089152e60f62d28b835fbff2cd2e8dc0baf1ac13343bef92ab7eed84548" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rodio" -version = "0.16.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb10b653d5ec0e9411a2e7d46e2c7f4046fd87d35b9955bd73ba4108d69072b5" +checksum = "e7ceb6607dd738c99bc8cb28eff249b7cd5c8ec88b9db96c0608c1480d140fb1" dependencies = [ "claxon", "cpal", "hound", "lewton", - "minimp3", + "symphonia", ] [[package]] @@ -1514,34 +1508,46 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +[[package]] +name = "rustix" +version = "0.38.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + [[package]] name = "rustyline" -version = "10.0.0" +version = "15.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1cd5ae51d3f7bf65d7969d579d502168ef578f289452bd8ccc91de28fda20e" +checksum = "2ee1e066dc922e513bda599c6ccb5f3bb2b0ea5870a579448f2622993f0a9a2f" dependencies = [ - "bitflags", + "bitflags 2.6.0", "cfg-if", "clipboard-win", - "dirs-next", "fd-lock", + "home", "libc", "log", "memchr", - "nix 0.24.2", + "nix", "radix_trie", - "scopeguard", "unicode-segmentation", - "unicode-width", + "unicode-width 0.2.0", "utf8parse", - "winapi", + "windows-sys 0.59.0", ] [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -1554,151 +1560,140 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "lazy_static", - "winapi", + "windows-sys 0.59.0", ] [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "scraper" -version = "0.13.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5684396b456f3eb69ceeb34d1b5cb1a2f6acf7ca4452131efa3ba0ee2c2d0a70" +checksum = "cc3d051b884f40e309de6c149734eab57aa8cc1347992710dc80bcc1c2194c15" dependencies = [ "cssparser", "ego-tree", "getopts", "html5ever", - "matches", + "precomputed-hash", "selectors", - "smallvec", "tendril", ] [[package]] name = "selectors" -version = "0.22.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" +checksum = "fd568a4c9bb598e291a08244a5c1f5a8a6650bee243b5b0f8dbb3d9cc1d87fe8" dependencies = [ - "bitflags", + "bitflags 2.6.0", "cssparser", "derive_more", "fxhash", "log", - "matches", - "phf 0.8.0", - "phf_codegen 0.8.0", + "new_debug_unreachable", + "phf", + "phf_codegen", "precomputed-hash", "servo_arc", "smallvec", - "thin-slice", ] [[package]] name = "serde" -version = "1.0.144" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f747710de3dcd43b88c9168773254e809d8ddbdf9653b84e2554ab219f17860" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.144" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94ed3a816fb1d101812f83e789f888322c34e291f894f19590dc310963e87a00" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] name = "serde_json" -version = "1.0.87" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ - "itoa 1.0.1", + "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "servo_arc" -version = "0.1.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432" +checksum = "ae65c4249478a2647db249fb43e23cec56a2c8974a427e7bd8cb5a1d0964921a" dependencies = [ - "nodrop", "stable_deref_trait", ] [[package]] name = "shlex" -version = "0.1.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "siphasher" -version = "0.3.3" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8f3741c7372e75519bd9346068370c9cdaabcc1f9599cbcf2a2719352286b7" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "slice-deque" -version = "0.3.0" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ef6ee280cdefba6d2d0b4b78a84a1c1a3f3a4cec98c2d4231c8bc225de0f25" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "libc", - "mach", - "winapi", + "autocfg", ] [[package]] name = "sluice" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fa0333a60ff2e3474a6775cc611840c2a55610c831dd366503474c02f1a28f5" +checksum = "6d7400c0eff44aa2fcb5e31a5f24ba9716ed90138769e4977a2ba6014ae63eb5" dependencies = [ - "futures-channel", + "async-channel", "futures-core", "futures-io", ] [[package]] name = "smallvec" -version = "1.6.1" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.4.0" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dfc207c526015c632472a77be09cf1b6e46866581aecae5cc38fb4235dea2" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -1707,45 +1702,28 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "stdweb" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5430c8e36b713e13b48a9f709cc21e046723fe44ce34587b73a830203b533e" - -[[package]] -name = "str-buf" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d44a3643b4ff9caf57abcee9c2c621d6c03d9135e0d8b589bd9afb5992cb176a" - -[[package]] -name = "str-buf" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66ae6a6cd930c97707cb3f1b62aadb8ddddd2fefa9df539564b3bfaa15dd31f" - [[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 0.8.0", + "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 0.8.0", - "phf_shared 0.8.0", + "phf_generator 0.10.0", + "phf_shared 0.10.0", "proc-macro2", "quote", ] @@ -1771,25 +1749,96 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "symphonia" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "815c942ae7ee74737bb00f965fa5b5a2ac2ce7b6c01c0cc169bbeaf7abd5f5a9" +dependencies = [ + "lazy_static", + "symphonia-bundle-mp3", + "symphonia-core", + "symphonia-metadata", +] + +[[package]] +name = "symphonia-bundle-mp3" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c01c2aae70f0f1fb096b6f0ff112a930b1fb3626178fba3ae68b09dce71706d4" +dependencies = [ + "lazy_static", + "log", + "symphonia-core", + "symphonia-metadata", +] + +[[package]] +name = "symphonia-core" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "798306779e3dc7d5231bd5691f5a813496dc79d3f56bf82e25789f2094e022c3" +dependencies = [ + "arrayvec", + "bitflags 1.3.2", + "bytemuck", + "lazy_static", + "log", +] + +[[package]] +name = "symphonia-metadata" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc622b9841a10089c5b18e99eb904f4341615d5aa55bbf4eedde1be721a4023c" +dependencies = [ + "encoding_rs", + "lazy_static", + "log", + "symphonia-core", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] name = "syn" -version = "1.0.94" +version = "2.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a07e33e919ebcd69113d5be0e4d70c5707004ff45188910106854f38b960df4a" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "syn 2.0.95", ] [[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 = [ "futf", "mac", @@ -1813,66 +1862,77 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ "term_size", - "unicode-width", + "unicode-width 0.1.14", ] -[[package]] -name = "thin-slice" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" - [[package]] name = "thiserror" -version = "1.0.24" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.24" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.95", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", ] [[package]] name = "tinyvec" -version = "1.1.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] -name = "toml" -version = "0.5.8" +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ - "serde", + "indexmap", + "toml_datetime", + "winnow", ] [[package]] name = "tracing" -version = "0.1.25" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ - "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -1881,22 +1941,22 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.15" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.95", ] [[package]] name = "tracing-core" -version = "0.1.17" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -1909,53 +1969,35 @@ dependencies = [ "tracing", ] -[[package]] -name = "unicode-bidi" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -dependencies = [ - "matches", -] - [[package]] name = "unicode-ident" -version = "1.0.1" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd2fe26506023ed7b5e1e315add59d6f584c621d037f9368fea9cfb988f368c" - -[[package]] -name = "unicode-normalization" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" -dependencies = [ - "tinyvec", -] +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-segmentation" -version = "1.7.1" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" [[package]] -name = "unicode-xid" -version = "0.2.1" +name = "unicode-width" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" [[package]] name = "url" -version = "2.3.1" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -1964,87 +2006,105 @@ dependencies = [ [[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 = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "utf8parse" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936e4b492acfd135421d8dca4b1aa80a7bfc26e702ef3af710e0752684df5372" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "vcpkg" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "317211a0dc0ceedd78fb2ca9a44aed3d7b9b26f81870d485c07122b4350673b7" [[package]] name = "walkdir" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" dependencies = [ "same-file", - "winapi", "winapi-util", ] [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.71" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee1280240b7c461d6a0071313e08f34a60b0365f14260362e5a2b17d1d31aa7" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.71" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b7d8b6942b8bb3a9b0e73fc79b98095a27de6fa247615e59d096754a3bc2aa8" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", - "lazy_static", "log", "proc-macro2", "quote", - "syn", + "syn 2.0.95", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" -version = "0.2.71" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ac38da8ef716661f0f36c0d8320b89028efe10c7c0afde65baffb496ce0d3b" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2052,42 +2112,33 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.71" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc053ec74d454df287b9374ee8abb36ffd5acb95ba87da3ba5b7d3fe20eb401e" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.95", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.71" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d6f8ec44822dd71f5f221a5847fb34acd9060535c1211b70a05844c0f6383b1" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "web-sys" -version = "0.3.48" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec600b26223b2948cedfde2a0aa6756dcf1fef616f43d7b3097aaf53a6c4d92b" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", ] -[[package]] -name = "wepoll-sys" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcb14dea929042224824779fbc82d9fab8d2e6d3cbc0ac404de8edf489e77ff" -dependencies = [ - "cc", -] - [[package]] name = "winapi" version = "0.3.9" @@ -2106,11 +2157,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -2121,101 +2172,367 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.37.0" +version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" +checksum = "9252e5725dbed82865af151df558e754e4a3c2c30818359eb17465f1346a1b49" dependencies = [ - "windows_aarch64_msvc 0.37.0", - "windows_i686_gnu 0.37.0", - "windows_i686_msvc 0.37.0", - "windows_x86_64_gnu 0.37.0", - "windows_x86_64_msvc 0.37.0", + "windows-core", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.54.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12661b9c89351d684a50a8a643ce5f608e20243b9fb84687800163429f161d65" +dependencies = [ + "windows-result", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-result" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e383302e8ec8515204254685643de10811af0ed97ea37210dc26fb0032647f8" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows-targets 0.42.2", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.37.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.37.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[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.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.37.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[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.36.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.37.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[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.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.37.0" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" +dependencies = [ + "memchr", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "xshell" -version = "0.2.2" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d47097dc5c85234b1e41851b3422dd6d19b3befdd35b4ae5ce386724aeca981" +checksum = "9e7290c623014758632efe00737145b6867b66292c42167f2ec381eb566a373d" dependencies = [ "xshell-macros", ] [[package]] name = "xshell-macros" -version = "0.2.2" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32ac00cd3f8ec9c1d33fb3e7958a82df6989c42d747bd326c822b1d625283547" + +[[package]] +name = "yoke" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88301b56c26dd9bf5c43d858538f82d6f3f7764767defbc5d34e59459901c41a" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", +] + +[[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 = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] diff --git a/Cargo.toml b/Cargo.toml index 3499ee3..3f45f48 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,41 +26,41 @@ full = ["audio"] audio = ["rodio"] [dependencies] -colored = "^2.0" -itertools = "^0.10" -regex = "^1.4" -scraper = "^0.13" -url = "^2.3" -rodio = { version = "^0.16", optional = true } -lazy_static = "^1" -serde = { version = "^1.0", features = ["derive"] } -serde_json = "^1.0" -anyhow = "^1.0.68" -cfg-if = "^1.0.0" -rustyline = "^10.0.0" +colored = "2" +itertools = "0.14" +regex = "1" +scraper = "0.22" +url = "2.5" +rodio = { version = "0.20", optional = true } +lazy_static = "1" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +anyhow = "1" +cfg-if = "1" +rustyline = "15" [dependencies.structopt] -version = "^0.3" +version = "0.3" default-features = false features = ["wrap_help", "color"] [target.'cfg(not(target_env = "musl"))'.dependencies.isahc] -version = "^1.7" +version = "1" default-features = false features = ["text-decoding"] [target.'cfg(target_env = "musl")'.dependencies.isahc] -version = "^1.7" +version = "1" default-features = false features = ["text-decoding", "static-ssl"] [build-dependencies] -quote = "^1.0.21" -serde = { version = "^1.0", features = ["derive"] } -serde_json = { version = "^1.0", features = ["raw_value"] } -xshell = "^0.2.2" +quote = "1" +serde = { version = "1", features = ["derive"] } +serde_json = { version = "1", features = ["raw_value"] } +xshell = "0.2" [build-dependencies.structopt] -version = "^0.3" +version = "0.3" features = ["wrap_help"] default-features = false diff --git a/build.rs b/build.rs index 22bc2af..af76651 100644 --- a/build.rs +++ b/build.rs @@ -22,10 +22,16 @@ fn main() -> Result<()> { // Stealing from https://github.com/rust-analyzer/rust-analyzer/blob/5f6d71cf/xtask/src/codegen.rs#L74 fn reformat(text: &str) -> Result { - let rustfmt_toml = ".rustfmt.toml"; - let stdout = cmd!("rustfmt --config-path {rustfmt_toml}").stdin(text).read()?; + let sh = xshell::Shell::new()?; + let rustfmt_toml = "rustfmt.toml"; + let stdout = cmd!(sh, "rustfmt --config-path {rustfmt_toml}") + .stdin(text) + .read()?; let preamble = "Generated file, do not edit by hand, see `/build.rs`"; - Ok(format!("//! {}\n\n{}\n\n{}\n", preamble, stdout, "// vim: ro")) + Ok(format!( + "//! {}\n\n{}\n\n{}\n", + preamble, stdout, "// vim: ro" + )) } fn gen_completions() -> Result<()> { @@ -50,14 +56,10 @@ fn gen_tests() -> Result<()> { if !test_data.is_empty() { let mut buf = BufWriter::new(Vec::new()); let key = format_ident!("{}", key); - writeln!( - &mut buf, - "{}", - quote! { - use clitrans::engine::#key::Translator; - use clitrans::{{Translate, Translation}}; - } - )?; + writeln!(&mut buf, "{}", quote! { + use clitrans::engine::#key::Translator; + use clitrans::{{Translate, Translation}}; + })?; for item in test_data.into_iter() { let name = format_ident!("{}", item.name); let input = item.input; diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..791918c --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,3 @@ +[toolchain] +channel = "nightly" +components = ["rustfmt", "clippy", "rust-analyzer"] diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..1921c9c --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,13 @@ +edition = "2021" +max_width = 100 +reorder_imports = true +struct_lit_width = 60 +struct_variant_width = 60 + +struct_field_align_threshold = 40 +comment_width = 100 +fn_single_line = false +imports_layout = "HorizontalVertical" +match_arm_blocks = false +overflow_delimited_expr = true +imports_granularity = "Crate" diff --git a/src/engine/bing.rs b/src/engine/bing.rs index fe45f1e..1330c1d 100644 --- a/src/engine/bing.rs +++ b/src/engine/bing.rs @@ -8,7 +8,12 @@ pub struct Translator; impl Translate for Translator { fn translate(&self, input: &str) -> Result> { - let uri = format_url!("https://cn.bing.com/dict/search?q={}&mkt={}", input, "zh-cn")?.to_uri()?; + let uri = format_url!( + "https://cn.bing.com/dict/search?q={}&mkt={}", + input, + "zh-cn" + )? + .to_uri()?; let resp = Request::get(&uri) .header("Accept-Encoding", "gzip") .header("Accept-Language", "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7") @@ -66,11 +71,15 @@ fn parse_pronounciations(detail: ElementRef) -> Vec { let pron: String = div.text().collect(); let audio = it.next().and_then(|div| { div.children().next().and_then(|a| { - a.value().as_element().unwrap().attr("onclick").and_then(|s| { - RE_MP3 - .captures(s) - .and_then(|caps| caps.get(0).map(|url| url.as_str().to_owned())) - }) + a.value() + .as_element() + .unwrap() + .attr("onclick") + .and_then(|s| { + RE_MP3 + .captures(s) + .and_then(|caps| caps.get(0).map(|url| url.as_str().to_owned())) + }) }) }); if let Some(caps) = RE_US.captures(&pron) { @@ -90,13 +99,26 @@ fn parse_explanation(detail: ElementRef) -> Vec { let s_def = Selector::parse(".def").unwrap(); let mut exps = vec![]; for li in detail.select(&s_li) { - let pos: String = li.select(&s_pos).next().expect("pos not found").text().collect(); - let def: String = li.select(&s_def).next().expect("def not found").text().collect(); + let pos: String = li + .select(&s_pos) + .next() + .expect("pos not found") + .text() + .collect(); + let def: String = li + .select(&s_def) + .next() + .expect("def not found") + .text() + .collect(); let tag = match pos.trim() { "网络" => ExpTag::Web, s => ExpTag::Pos(s.to_owned()), }; - let items = def.split(&[';', ';'][..]).map(|v| v.trim().to_owned()).collect(); + let items = def + .split(&[';', ';'][..]) + .map(|v| v.trim().to_owned()) + .collect(); exps.push(Explanation { tag, items }); } exps diff --git a/src/engine/mod.rs b/src/engine/mod.rs index 7ccb826..2fa28ec 100644 --- a/src/engine/mod.rs +++ b/src/engine/mod.rs @@ -1,13 +1,17 @@ pub mod bing; pub mod youdao; -use super::translation::{ExpTag, Explanation, Pronunciation, Translation}; -use super::util::html::*; -use super::{Result, Translate}; +use super::{ + translation::{ExpTag, Explanation, Pronunciation, Translation}, + util::html::*, + Result, + Translate, +}; use isahc::{ http::{self, Request, Uri}, - ReadResponseExt, RequestExt, + ReadResponseExt, + RequestExt, }; use url::Url; diff --git a/src/engine/youdao.rs b/src/engine/youdao.rs index 823f52b..5f2ee91 100644 --- a/src/engine/youdao.rs +++ b/src/engine/youdao.rs @@ -83,7 +83,7 @@ fn parse_pronounciations(detail: ElementRef) -> Vec { prons.push(Pronunciation::uk(caps[1].to_owned()).audio(audio)); } } - if let Some(s) = get_text(detail, "#phrsListTab > h2 > span.phonetic").get(0) { + if let Some(s) = get_text(detail, "#phrsListTab > h2 > span.phonetic").first() { prons.push(Pronunciation::pinyin( s.as_str().trim_matches(&['[', ']'][..]).to_owned(), )); @@ -148,17 +148,14 @@ fn parse_explanation_machine(detail: ElementRef) -> Option { let value = get_text(detail, "#fanyiToggle > div > p:nth-child(2)") .into_iter() .next()?; - Some(Explanation { - tag: ExpTag::Machine, - items: vec![value], - }) + Some(Explanation { tag: ExpTag::Machine, items: vec![value] }) } fn parse_explanation_web(detail: ElementRef) -> Vec { let texts = get_text(detail, "#tWebTrans > div.wt-container > .title"); - let items = texts.iter().map(|s| s.split_whitespace().join(" ")).collect(); - vec![Explanation { - tag: ExpTag::Web, - items, - }] + let items = texts + .iter() + .map(|s| s.split_whitespace().join(" ")) + .collect(); + vec![Explanation { tag: ExpTag::Web, items }] } diff --git a/src/main.rs b/src/main.rs index cf96390..31e6a83 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,12 +3,13 @@ mod cli; use anyhow::{bail, Result}; use cli::*; use clitrans::{engine::*, Layout, Translate, Translation}; -use rustyline::{error::ReadlineError, Editor}; -use std::sync::mpsc; +use rustyline::{error::ReadlineError, DefaultEditor}; use std::{ collections::HashSet, io::{self, stdout}, - process, thread, + process, + sync::mpsc, + thread, }; fn main() { @@ -43,7 +44,7 @@ fn try_main() -> Result { match &opts.query { Some(query) => translate(query, &opts, &layout)?, None => loop { - let mut rl = Editor::<()>::new(); + let mut rl = DefaultEditor::new()?; let line = rl.readline("> "); match line { Ok(query) => { diff --git a/src/translation.rs b/src/translation.rs index e27df0b..2ba2c9f 100644 --- a/src/translation.rs +++ b/src/translation.rs @@ -50,25 +50,13 @@ pub struct Pronunciation { impl Pronunciation { pub fn pinyin(value: String) -> Self { - Self { - tag: "CN".to_owned(), - value, - audio: None, - } + Self { tag: "CN".to_owned(), value, audio: None } } pub fn us(value: String) -> Self { - Self { - tag: "US".to_owned(), - value, - audio: None, - } + Self { tag: "US".to_owned(), value, audio: None } } pub fn uk(value: String) -> Self { - Self { - tag: "UK".to_owned(), - value, - audio: None, - } + Self { tag: "UK".to_owned(), value, audio: None } } pub fn audio(mut self, url: Option) -> Self { self.audio = url; @@ -109,7 +97,11 @@ impl Translation { if possibles.is_empty() { bail!("audio not found") } else { - bail!("audio not found for '{}'; possible values: [{}]", tag, possibles) + bail!( + "audio not found for '{}'; possible values: [{}]", + tag, + possibles + ) }; } } @@ -161,7 +153,12 @@ impl Translation { Ok(()) } - fn print_explanations(&self, layout: &Layout, indent: usize, exps: &[(Color, &str, &[String])]) -> io::Result<()> { + fn print_explanations( + &self, + layout: &Layout, + indent: usize, + exps: &[(Color, &str, &[String])], + ) -> io::Result<()> { if !exps.is_empty() && layout.explanations > 0 { let buf = exps .iter() @@ -199,7 +196,9 @@ impl Translation { format!("{:>w$} {} {}\n", "", "*".cyan(), phrase.cyan(), w = indent) + &exps .iter() - .map(|exp| format!("{:>w$} {} {}", "", "-".cyan(), exp.cyan(), w = indent)) + .map(|exp| { + format!("{:>w$} {} {}", "", "-".cyan(), exp.cyan(), w = indent) + }) .join("\n") }) .join("\n\n"); diff --git a/tests/engine/bing/mod.rs b/tests/engine/bing/mod.rs index bad725c..05890a9 100644 --- a/tests/engine/bing/mod.rs +++ b/tests/engine/bing/mod.rs @@ -1,7 +1,6 @@ //! Generated file, do not edit by hand, see `/build.rs` -use clitrans::engine::bing::Translator; -use clitrans::{Translate, Translation}; +use clitrans::{engine::bing::Translator, Translate, Translation}; #[test] fn cn_word() { let trans = Translator; @@ -12,36 +11,44 @@ fn cn_word() { let r = r.unwrap(); let expected: Translation = serde_json::from_str( r#"{ - "query": "你好", - "url": "https://cn.bing.com/dict/search?q=%E4%BD%A0%E5%A5%BD&mkt=zh-cn", - "prons": [{ - "tag": "CN", - "value": "nǐ hǎo", - "audio": null - }], - "exps": [{ - "tag": { - "Pos": "na." - }, - "items": [ - "hello", - "〈正式,口〉how do you do?" - ] - }, { - "tag": { - "Pos": "Web" - }, - "items": [ - "Hello", - "Hi", - "How do you do" - ] - }], - "phrases": [] - }"#, + "query": "你好", + "url": "https://cn.bing.com/dict/search?q=%E4%BD%A0%E5%A5%BD&mkt=zh-cn", + "prons": [ + { + "tag": "CN", + "value": "nǐ hǎo", + "audio": null + } + ], + "exps": [ + { + "tag": { + "Pos": "na." + }, + "items": [ + "hello", + "〈正式,口〉how do you do?" + ] + }, + { + "tag": { + "Pos": "Web" + }, + "items": [ + "Hello", + "Hi", + "How do you do" + ] + } + ], + "phrases": [] + }"#, ) .unwrap(); - let msg = format!("\n=== Json dump:\n{}\n=== ", serde_json::to_string(&r).unwrap()); + let msg = format!( + "\n=== Json dump:\n{}\n=== ", + serde_json::to_string(&r).unwrap() + ); assert_eq!(r.query, expected.query, "{}", msg); assert_eq!(r.url, expected.url, "{}", msg); assert_eq!(r.exps, expected.exps, "{}", msg); @@ -55,25 +62,27 @@ fn cn_phrase() { let r = r.unwrap(); assert!(r.is_some()); let r = r.unwrap(); - let expected: Translation = serde_json::from_str( - r#"{ - "query": "你好,世界", - "url": "https://cn.bing.com/dict/search?q=%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C&mkt=zh-cn", - "prons": [], - "exps": [{ - "tag": { - "Pos": "Web" - }, - "items": [ - "hello world", - "Well,hello world" - ] - }], - "phrases": [] - }"#, - ) - .unwrap(); - let msg = format!("\n=== Json dump:\n{}\n=== ", serde_json::to_string(&r).unwrap()); + let expected : Translation = serde_json :: from_str (r#"{ + "query": "你好,世界", + "url": "https://cn.bing.com/dict/search?q=%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C&mkt=zh-cn", + "prons": [], + "exps": [ + { + "tag": { + "Pos": "Web" + }, + "items": [ + "hello world", + "Well,hello world" + ] + } + ], + "phrases": [] + }"#) . unwrap () ; + let msg = format!( + "\n=== Json dump:\n{}\n=== ", + serde_json::to_string(&r).unwrap() + ); assert_eq!(r.query, expected.query, "{}", msg); assert_eq!(r.url, expected.url, "{}", msg); assert_eq!(r.exps, expected.exps, "{}", msg); @@ -88,40 +97,49 @@ fn en_word() { assert!(r.is_some()); let r = r.unwrap(); let expected : Translation = serde_json :: from_str (r#"{ - "query": "hello", - "url": "https://cn.bing.com/dict/search?q=hello&mkt=zh-cn", - "prons": [{ - "tag": "US", - "value": "heˈləʊ", - "audio": "https://dictionary.blob.core.chinacloudapi.cn/media/audio/tom/bf/b1/BFB1169AD46D18FDC9145E494EF4D22B.mp3" - }, { - "tag": "UK", - "value": "hə'ləʊ", - "audio": "https://dictionary.blob.core.chinacloudapi.cn/media/audio/george/bf/b1/BFB1169AD46D18FDC9145E494EF4D22B.mp3" - }], - "exps": [{ - "tag": { - "Pos": "int." - }, - "items": [ - "你好", - "喂", - "您好", - "哈喽" - ] - }, { - "tag": { - "Pos": "Web" - }, - "items": [ - "哈罗", - "哈啰", - "大家好" - ] - }], - "phrases": [] - }"#) . unwrap () ; - let msg = format!("\n=== Json dump:\n{}\n=== ", serde_json::to_string(&r).unwrap()); + "query": "hello", + "url": "https://cn.bing.com/dict/search?q=hello&mkt=zh-cn", + "prons": [ + { + "tag": "US", + "value": "heˈləʊ", + "audio": "https://dictionary.blob.core.chinacloudapi.cn/media/audio/tom/bf/b1/BFB1169AD46D18FDC9145E494EF4D22B.mp3" + }, + { + "tag": "UK", + "value": "hə'ləʊ", + "audio": "https://dictionary.blob.core.chinacloudapi.cn/media/audio/george/bf/b1/BFB1169AD46D18FDC9145E494EF4D22B.mp3" + } + ], + "exps": [ + { + "tag": { + "Pos": "int." + }, + "items": [ + "你好", + "喂", + "您好", + "哈喽" + ] + }, + { + "tag": { + "Pos": "Web" + }, + "items": [ + "哈罗", + "哈啰", + "大家好" + ] + } + ], + "phrases": [] + }"#) . unwrap () ; + let msg = format!( + "\n=== Json dump:\n{}\n=== ", + serde_json::to_string(&r).unwrap() + ); assert_eq!(r.query, expected.query, "{}", msg); assert_eq!(r.url, expected.url, "{}", msg); assert_eq!(r.exps, expected.exps, "{}", msg); @@ -137,31 +155,37 @@ fn en_phrase() { let r = r.unwrap(); let expected: Translation = serde_json::from_str( r#"{ - "query": "Hello world", - "url": "https://cn.bing.com/dict/search?q=Hello,%20world&mkt=zh-cn", - "prons": [], - "exps": [{ - "tag": { - "Pos": "n." - }, - "items": [ - "世界你好" - ] - }, { - "tag": { - "Pos": "Web" - }, - "items": [ - "你好世界", - "别来无恙", - "哈罗" - ] - }], - "phrases": [] - }"#, + "query": "Hello world", + "url": "https://cn.bing.com/dict/search?q=Hello,%20world&mkt=zh-cn", + "prons": [], + "exps": [ + { + "tag": { + "Pos": "n." + }, + "items": [ + "世界你好" + ] + }, + { + "tag": { + "Pos": "Web" + }, + "items": [ + "你好世界", + "别来无恙", + "哈罗" + ] + } + ], + "phrases": [] + }"#, ) .unwrap(); - let msg = format!("\n=== Json dump:\n{}\n=== ", serde_json::to_string(&r).unwrap()); + let msg = format!( + "\n=== Json dump:\n{}\n=== ", + serde_json::to_string(&r).unwrap() + ); assert_eq!(r.query, expected.query, "{}", msg); assert_eq!(r.url, expected.url, "{}", msg); assert_eq!(r.exps, expected.exps, "{}", msg); diff --git a/tests/engine/bing/test_data.json b/tests/engine/bing/test_data.json index aa48d4c..a388c69 100644 --- a/tests/engine/bing/test_data.json +++ b/tests/engine/bing/test_data.json @@ -1,115 +1,134 @@ -[{ - "name": "cn_word", - "input": "你好", - "expect": { - "query": "你好", - "url": "https://cn.bing.com/dict/search?q=%E4%BD%A0%E5%A5%BD&mkt=zh-cn", - "prons": [{ - "tag": "CN", - "value": "nǐ hǎo", - "audio": null - }], - "exps": [{ - "tag": { - "Pos": "na." - }, - "items": [ - "hello", - "〈正式,口〉how do you do?" - ] - }, { - "tag": { - "Pos": "Web" - }, - "items": [ - "Hello", - "Hi", - "How do you do" - ] - }], - "phrases": [] - } -}, { - "name": "cn_phrase", - "input": "你好,世界", - "expect": { - "query": "你好,世界", - "url": "https://cn.bing.com/dict/search?q=%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C&mkt=zh-cn", - "prons": [], - "exps": [{ - "tag": { - "Pos": "Web" - }, - "items": [ - "hello world", - "Well,hello world" - ] - }], - "phrases": [] - } - -}, { - "name": "en_word", - "input": "hello", - "expect": { - "query": "hello", - "url": "https://cn.bing.com/dict/search?q=hello&mkt=zh-cn", - "prons": [{ - "tag": "US", - "value": "heˈləʊ", - "audio": "https://dictionary.blob.core.chinacloudapi.cn/media/audio/tom/bf/b1/BFB1169AD46D18FDC9145E494EF4D22B.mp3" - }, { - "tag": "UK", - "value": "hə'ləʊ", - "audio": "https://dictionary.blob.core.chinacloudapi.cn/media/audio/george/bf/b1/BFB1169AD46D18FDC9145E494EF4D22B.mp3" - }], - "exps": [{ - "tag": { - "Pos": "int." - }, - "items": [ - "你好", - "喂", - "您好", - "哈喽" - ] - }, { - "tag": { - "Pos": "Web" - }, - "items": [ - "哈罗", - "哈啰", - "大家好" - ] - }], - "phrases": [] - } - -}, { - "name": "en_phrase", - "input": "Hello, world", - "expect": { - "query": "Hello world", - "url": "https://cn.bing.com/dict/search?q=Hello,%20world&mkt=zh-cn", - "prons": [], - "exps": [{ - "tag": { - "Pos": "n." - }, - "items": [ - "世界你好" - ] - }, { - "tag": { - "Pos": "Web" - }, - "items": [ - "你好世界", - "别来无恙", - "哈罗" - ] - }], - "phrases": [] - } -}] +[ + { + "name": "cn_word", + "input": "你好", + "expect": { + "query": "你好", + "url": "https://cn.bing.com/dict/search?q=%E4%BD%A0%E5%A5%BD&mkt=zh-cn", + "prons": [ + { + "tag": "CN", + "value": "nǐ hǎo", + "audio": null + } + ], + "exps": [ + { + "tag": { + "Pos": "na." + }, + "items": [ + "hello", + "〈正式,口〉how do you do?" + ] + }, + { + "tag": { + "Pos": "Web" + }, + "items": [ + "Hello", + "Hi", + "How do you do" + ] + } + ], + "phrases": [] + } + }, + { + "name": "cn_phrase", + "input": "你好,世界", + "expect": { + "query": "你好,世界", + "url": "https://cn.bing.com/dict/search?q=%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C&mkt=zh-cn", + "prons": [], + "exps": [ + { + "tag": { + "Pos": "Web" + }, + "items": [ + "hello world", + "Well,hello world" + ] + } + ], + "phrases": [] + } + }, + { + "name": "en_word", + "input": "hello", + "expect": { + "query": "hello", + "url": "https://cn.bing.com/dict/search?q=hello&mkt=zh-cn", + "prons": [ + { + "tag": "US", + "value": "heˈləʊ", + "audio": "https://dictionary.blob.core.chinacloudapi.cn/media/audio/tom/bf/b1/BFB1169AD46D18FDC9145E494EF4D22B.mp3" + }, + { + "tag": "UK", + "value": "hə'ləʊ", + "audio": "https://dictionary.blob.core.chinacloudapi.cn/media/audio/george/bf/b1/BFB1169AD46D18FDC9145E494EF4D22B.mp3" + } + ], + "exps": [ + { + "tag": { + "Pos": "int." + }, + "items": [ + "你好", + "喂", + "您好", + "哈喽" + ] + }, + { + "tag": { + "Pos": "Web" + }, + "items": [ + "哈罗", + "哈啰", + "大家好" + ] + } + ], + "phrases": [] + } + }, + { + "name": "en_phrase", + "input": "Hello, world", + "expect": { + "query": "Hello world", + "url": "https://cn.bing.com/dict/search?q=Hello,%20world&mkt=zh-cn", + "prons": [], + "exps": [ + { + "tag": { + "Pos": "n." + }, + "items": [ + "世界你好" + ] + }, + { + "tag": { + "Pos": "Web" + }, + "items": [ + "你好世界", + "别来无恙", + "哈罗" + ] + } + ], + "phrases": [] + } + } +] diff --git a/tests/engine/youdao/mod.rs b/tests/engine/youdao/mod.rs index a5d7ee5..bbfc50d 100644 --- a/tests/engine/youdao/mod.rs +++ b/tests/engine/youdao/mod.rs @@ -1,7 +1,6 @@ //! Generated file, do not edit by hand, see `/build.rs` -use clitrans::engine::youdao::Translator; -use clitrans::{Translate, Translation}; +use clitrans::{engine::youdao::Translator, Translate, Translation}; #[test] fn cn_word() { let trans = Translator; @@ -12,30 +11,70 @@ fn cn_word() { let r = r.unwrap(); let expected: Translation = serde_json::from_str( r#"{ - "query": "你好", - "url": "http://dict.youdao.com/w/%E4%BD%A0%E5%A5%BD", - "prons": [{ - "tag": "CN", - "value": "nǐ hǎo", - "audio": null - }], - "exps": [{ - "tag": "Phrase", - "items": ["hello", "hi", "how do you do"] - }, { - "tag": "Web", - "items": ["Hello", "How do you do", "hi", "What's up"] - }], - "phrases": [ - ["你好吗", ["How are you", "How Do You Do", "Are You OK"]], - ["你好小娜", ["Hey Cortana"]], - ["你好啊", ["Hello", "Hey"]], - ["先生你好", ["Hello Sir"]] - ] - }"#, + "query": "你好", + "url": "http://dict.youdao.com/w/%E4%BD%A0%E5%A5%BD", + "prons": [ + { + "tag": "CN", + "value": "nǐ hǎo", + "audio": null + } + ], + "exps": [ + { + "tag": "Phrase", + "items": [ + "hello", + "hi", + "how do you do" + ] + }, + { + "tag": "Web", + "items": [ + "Hello", + "How do you do", + "hi", + "What's up" + ] + } + ], + "phrases": [ + [ + "你好吗", + [ + "How are you", + "How Do You Do", + "Are You OK" + ] + ], + [ + "你好小娜", + [ + "Hey Cortana" + ] + ], + [ + "你好啊", + [ + "Hello", + "Hey" + ] + ], + [ + "先生你好", + [ + "Hello Sir" + ] + ] + ] + }"#, ) .unwrap(); - let msg = format!("\n=== Json dump:\n{}\n=== ", serde_json::to_string(&r).unwrap()); + let msg = format!( + "\n=== Json dump:\n{}\n=== ", + serde_json::to_string(&r).unwrap() + ); assert_eq!(r.query, expected.query, "{}", msg); assert_eq!(r.url, expected.url, "{}", msg); assert_eq!(r.exps, expected.exps, "{}", msg); @@ -51,27 +90,61 @@ fn cn_phrase() { let r = r.unwrap(); let expected: Translation = serde_json::from_str( r#"{ - "query": "你好,世界", - "url": "http://dict.youdao.com/w/%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C", - "prons": [], - "exps": [{ - "tag": "Machine", - "items": ["Hello, world"] - }, { - "tag": "Web", - "items": [] - }], - "phrases": [ - ["你好世界", ["hello world"]], - ["你好世界新闻和密钥", ["hello world press and key"]], - ["你好世界新闻和关键", ["hello world press and key"]], - ["你好世界命令行参数", ["hello world command line args"]], - ["世界你好", ["Hello World", "World how are"]] - ] - }"#, + "query": "你好,世界", + "url": "http://dict.youdao.com/w/%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C", + "prons": [], + "exps": [ + { + "tag": "Machine", + "items": [ + "Hello, world" + ] + }, + { + "tag": "Web", + "items": [] + } + ], + "phrases": [ + [ + "你好世界", + [ + "hello world" + ] + ], + [ + "你好世界新闻和密钥", + [ + "hello world press and key" + ] + ], + [ + "你好世界新闻和关键", + [ + "hello world press and key" + ] + ], + [ + "你好世界命令行参数", + [ + "hello world command line args" + ] + ], + [ + "世界你好", + [ + "Hello World", + "World how are" + ] + ] + ] + }"#, ) .unwrap(); - let msg = format!("\n=== Json dump:\n{}\n=== ", serde_json::to_string(&r).unwrap()); + let msg = format!( + "\n=== Json dump:\n{}\n=== ", + serde_json::to_string(&r).unwrap() + ); assert_eq!(r.query, expected.query, "{}", msg); assert_eq!(r.url, expected.url, "{}", msg); assert_eq!(r.exps, expected.exps, "{}", msg); @@ -87,49 +160,82 @@ fn en_word() { let r = r.unwrap(); let expected: Translation = serde_json::from_str( r#"{ - "query": "hello", - "url": "http://dict.youdao.com/w/hello", - "prons": [{ - "tag": "UK", - "value": "həˈləʊ", - "audio": "https://dict.youdao.com/dictvoice?audio=hello&type=1" - }, { - "tag": "US", - "value": "həˈləʊ", - "audio": "https://dict.youdao.com/dictvoice?audio=hello&type=2" - }], - "exps": [{ - "tag": { - "Pos": "int." - }, - "items": ["喂", "哈罗,你好,您好(表示问候, 惊奇或唤起注意时的用语)"] - }, { - "tag": { - "Pos": "vi." - }, - "items": ["说(或大声说)“喂”", "打招呼"] - }, { - "tag": { - "Pos": "n." - }, - "items": ["“喂”的招呼声", "打招呼,问候"] - }, { - "tag": { - "Pos": "n." - }, - "items": ["(Hello)(法)埃洛(人名)"] - }, { - "tag": "Web", - "items": ["您好", "哈啰", "喂"] - }], - "phrases": [ - ["Hello Kitty", ["凯蒂猫", "吉蒂猫"]], - ["Hello Neighbor", ["你好邻居"]] - ] - }"#, + "query": "hello", + "url": "http://dict.youdao.com/w/hello", + "prons": [ + { + "tag": "UK", + "value": "həˈləʊ", + "audio": "https://dict.youdao.com/dictvoice?audio=hello&type=1" + }, + { + "tag": "US", + "value": "həˈloʊ", + "audio": "https://dict.youdao.com/dictvoice?audio=hello&type=2" + } + ], + "exps": [ + { + "tag": { + "Pos": "int." + }, + "items": [ + "喂,你好(用于问候或打招呼)", + "喂,你好(打电话时的招呼语)", + "喂,你好(引起别人注意的招呼语)", + "<非正式>喂,嘿 (认为别人说了蠢话或分心)", + "<英,旧>嘿(表示惊讶)" + ] + }, + { + "tag": { + "Pos": "n." + }, + "items": [ + "招呼,问候", + "(Hello)(法、印、美、俄)埃洛(人名)" + ] + }, + { + "tag": { + "Pos": "v." + }, + "items": [ + "说(或大声说)“喂”", + "打招呼" + ] + }, + { + "tag": "Web", + "items": [ + "您好", + "哈啰", + "喂" + ] + } + ], + "phrases": [ + [ + "Hello Kitty", + [ + "凯蒂猫", + "吉蒂猫" + ] + ], + [ + "Hello Neighbor", + [ + "你好邻居" + ] + ] + ] + }"#, ) .unwrap(); - let msg = format!("\n=== Json dump:\n{}\n=== ", serde_json::to_string(&r).unwrap()); + let msg = format!( + "\n=== Json dump:\n{}\n=== ", + serde_json::to_string(&r).unwrap() + ); assert_eq!(r.query, expected.query, "{}", msg); assert_eq!(r.url, expected.url, "{}", msg); assert_eq!(r.exps, expected.exps, "{}", msg); @@ -145,30 +251,82 @@ fn en_phrase() { let r = r.unwrap(); let expected: Translation = serde_json::from_str( r#"{ - "query": "Hello, world", - "url": "http://dict.youdao.com/w/Hello,%20world", - "prons": [], - "exps": [{ - "tag": "Machine", - "items": ["你好,世界"] - }, { - "tag": "Web", - "items": [] - }], - "phrases": [ - ["hello world", ["你好世界", "开始", "别来无恙", "举个例子"]], - ["Hello world UI", ["实现方法"]], - ["hello world press and key", ["您好世界新闻和关键", "你好世界新闻和密钥"]], - ["Hello world only", ["世间只有你好"]], - ["Hello world always", ["世间始终你好"]], - ["air hello world", ["调税计算器"]], - ["Hello Kitty Cutie World", ["凯蒂猫顽皮世界"]], - ["Hello world DIY", ["西雅图"]] - ] - }"#, + "query": "Hello, world", + "url": "http://dict.youdao.com/w/Hello,%20world", + "prons": [], + "exps": [ + { + "tag": "Machine", + "items": [ + "你好,世界" + ] + }, + { + "tag": "Web", + "items": [] + } + ], + "phrases": [ + [ + "hello world", + [ + "你好世界", + "开始", + "别来无恙", + "举个例子" + ] + ], + [ + "Hello world UI", + [ + "实现方法" + ] + ], + [ + "hello world press and key", + [ + "您好世界新闻和关键", + "你好世界新闻和密钥" + ] + ], + [ + "Hello world only", + [ + "世间只有你好" + ] + ], + [ + "Hello world always", + [ + "世间始终你好" + ] + ], + [ + "air hello world", + [ + "调税计算器" + ] + ], + [ + "Hello Kitty Cutie World", + [ + "凯蒂猫顽皮世界" + ] + ], + [ + "HELLO WORLD&", + [ + "第一行代码" + ] + ] + ] + }"#, ) .unwrap(); - let msg = format!("\n=== Json dump:\n{}\n=== ", serde_json::to_string(&r).unwrap()); + let msg = format!( + "\n=== Json dump:\n{}\n=== ", + serde_json::to_string(&r).unwrap() + ); assert_eq!(r.query, expected.query, "{}", msg); assert_eq!(r.url, expected.url, "{}", msg); assert_eq!(r.exps, expected.exps, "{}", msg); diff --git a/tests/engine/youdao/test_data.json b/tests/engine/youdao/test_data.json index c047426..59d8b3f 100644 --- a/tests/engine/youdao/test_data.json +++ b/tests/engine/youdao/test_data.json @@ -1,117 +1,269 @@ -[{ - "name": "cn_word", - "input": "你好", - "expect": { - "query": "你好", - "url": "http://dict.youdao.com/w/%E4%BD%A0%E5%A5%BD", - "prons": [{ - "tag": "CN", - "value": "nǐ hǎo", - "audio": null - }], - "exps": [{ - "tag": "Phrase", - "items": ["hello", "hi", "how do you do"] - }, { - "tag": "Web", - "items": ["Hello", "How do you do", "hi", "What's up"] - }], - "phrases": [ - ["你好吗", ["How are you", "How Do You Do", "Are You OK"]], - ["你好小娜", ["Hey Cortana"]], - ["你好啊", ["Hello", "Hey"]], - ["先生你好", ["Hello Sir"]] - ] - } -}, { - "name": "cn_phrase", - "input": "你好,世界", - "expect": { - "query": "你好,世界", - "url": "http://dict.youdao.com/w/%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C", - "prons": [], - "exps": [{ - "tag": "Machine", - "items": ["Hello, world"] - }, { - "tag": "Web", - "items": [] - }], - "phrases": [ - ["你好世界", ["hello world"]], - ["你好世界新闻和密钥", ["hello world press and key"]], - ["你好世界新闻和关键", ["hello world press and key"]], - ["你好世界命令行参数", ["hello world command line args"]], - ["世界你好", ["Hello World", "World how are"]] - ] - } -}, { - "name": "en_word", - "input": "hello", - "expect": { - "query": "hello", - "url": "http://dict.youdao.com/w/hello", - "prons": [{ - "tag": "UK", - "value": "həˈləʊ", - "audio": "https://dict.youdao.com/dictvoice?audio=hello&type=1" - }, { - "tag": "US", - "value": "həˈləʊ", - "audio": "https://dict.youdao.com/dictvoice?audio=hello&type=2" - }], - "exps": [{ - "tag": { - "Pos": "int." - }, - "items": ["喂", "哈罗,你好,您好(表示问候, 惊奇或唤起注意时的用语)"] - }, { - "tag": { - "Pos": "vi." - }, - "items": ["说(或大声说)“喂”", "打招呼"] - }, { - "tag": { - "Pos": "n." - }, - "items": ["“喂”的招呼声", "打招呼,问候"] - }, { - "tag": { - "Pos": "n." - }, - "items": ["(Hello)(法)埃洛(人名)"] - }, { - "tag": "Web", - "items": ["您好", "哈啰", "喂"] - }], - "phrases": [ - ["Hello Kitty", ["凯蒂猫", "吉蒂猫"]], - ["Hello Neighbor", ["你好邻居"]] - ] - } -}, { - "name": "en_phrase", - "input": "Hello, world", - "expect": { - "query": "Hello, world", - "url": "http://dict.youdao.com/w/Hello,%20world", - "prons": [], - "exps": [{ - "tag": "Machine", - "items": ["你好,世界"] - }, { - "tag": "Web", - "items": [] - }], - "phrases": [ - ["hello world", ["你好世界", "开始", "别来无恙", "举个例子"]], - ["Hello world UI", ["实现方法"]], - ["hello world press and key", ["您好世界新闻和关键", "你好世界新闻和密钥"]], - ["Hello world only", ["世间只有你好"]], - ["Hello world always", ["世间始终你好"]], - ["air hello world", ["调税计算器"]], - ["Hello Kitty Cutie World", ["凯蒂猫顽皮世界"]], - ["Hello world DIY", ["西雅图"]] - ] - } -}] +[ + { + "name": "cn_word", + "input": "你好", + "expect": { + "query": "你好", + "url": "http://dict.youdao.com/w/%E4%BD%A0%E5%A5%BD", + "prons": [ + { + "tag": "CN", + "value": "nǐ hǎo", + "audio": null + } + ], + "exps": [ + { + "tag": "Phrase", + "items": [ + "hello", + "hi", + "how do you do" + ] + }, + { + "tag": "Web", + "items": [ + "Hello", + "How do you do", + "hi", + "What's up" + ] + } + ], + "phrases": [ + [ + "你好吗", + [ + "How are you", + "How Do You Do", + "Are You OK" + ] + ], + [ + "你好小娜", + [ + "Hey Cortana" + ] + ], + [ + "你好啊", + [ + "Hello", + "Hey" + ] + ], + [ + "先生你好", + [ + "Hello Sir" + ] + ] + ] + } + }, + { + "name": "cn_phrase", + "input": "你好,世界", + "expect": { + "query": "你好,世界", + "url": "http://dict.youdao.com/w/%E4%BD%A0%E5%A5%BD%EF%BC%8C%E4%B8%96%E7%95%8C", + "prons": [], + "exps": [ + { + "tag": "Machine", + "items": [ + "Hello, world" + ] + }, + { + "tag": "Web", + "items": [] + } + ], + "phrases": [ + [ + "你好世界", + [ + "hello world" + ] + ], + [ + "你好世界新闻和密钥", + [ + "hello world press and key" + ] + ], + [ + "你好世界新闻和关键", + [ + "hello world press and key" + ] + ], + [ + "你好世界命令行参数", + [ + "hello world command line args" + ] + ], + [ + "世界你好", + [ + "Hello World", + "World how are" + ] + ] + ] + } + }, + { + "name": "en_word", + "input": "hello", + "expect": { + "query": "hello", + "url": "http://dict.youdao.com/w/hello", + "prons": [ + { + "tag": "UK", + "value": "həˈləʊ", + "audio": "https://dict.youdao.com/dictvoice?audio=hello&type=1" + }, + { + "tag": "US", + "value": "həˈloʊ", + "audio": "https://dict.youdao.com/dictvoice?audio=hello&type=2" + } + ], + "exps": [ + { + "tag": { + "Pos": "int." + }, + "items": [ + "喂,你好(用于问候或打招呼)", + "喂,你好(打电话时的招呼语)", + "喂,你好(引起别人注意的招呼语)", + "<非正式>喂,嘿 (认为别人说了蠢话或分心)", + "<英,旧>嘿(表示惊讶)" + ] + }, + { + "tag": { + "Pos": "n." + }, + "items": [ + "招呼,问候", + "(Hello)(法、印、美、俄)埃洛(人名)" + ] + }, + { + "tag": { + "Pos": "v." + }, + "items": [ + "说(或大声说)“喂”", + "打招呼" + ] + }, + { + "tag": "Web", + "items": [ + "您好", + "哈啰", + "喂" + ] + } + ], + "phrases": [ + [ + "Hello Kitty", + [ + "凯蒂猫", + "吉蒂猫" + ] + ], + [ + "Hello Neighbor", + [ + "你好邻居" + ] + ] + ] + } + }, + { + "name": "en_phrase", + "input": "Hello, world", + "expect": { + "query": "Hello, world", + "url": "http://dict.youdao.com/w/Hello,%20world", + "prons": [], + "exps": [ + { + "tag": "Machine", + "items": [ + "你好,世界" + ] + }, + { + "tag": "Web", + "items": [] + } + ], + "phrases": [ + [ + "hello world", + [ + "你好世界", + "开始", + "别来无恙", + "举个例子" + ] + ], + [ + "Hello world UI", + [ + "实现方法" + ] + ], + [ + "hello world press and key", + [ + "您好世界新闻和关键", + "你好世界新闻和密钥" + ] + ], + [ + "Hello world only", + [ + "世间只有你好" + ] + ], + [ + "Hello world always", + [ + "世间始终你好" + ] + ], + [ + "air hello world", + [ + "调税计算器" + ] + ], + [ + "Hello Kitty Cutie World", + [ + "凯蒂猫顽皮世界" + ] + ], + [ + "HELLO WORLD&", + [ + "第一行代码" + ] + ] + ] + } + } +]