diff --git a/.github/workflows/benchmark-core.yml b/.github/workflows/benchmark-core.yml index b7259056ba7..5e7d0a943e4 100644 --- a/.github/workflows/benchmark-core.yml +++ b/.github/workflows/benchmark-core.yml @@ -61,7 +61,7 @@ jobs: echo "${{ github.event.number }}" > .PR_NUMBER - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: benchmark-core path: | diff --git a/.github/workflows/benchmark-ssr.yml b/.github/workflows/benchmark-ssr.yml index 52ddb31be57..c470077adb6 100644 --- a/.github/workflows/benchmark-ssr.yml +++ b/.github/workflows/benchmark-ssr.yml @@ -62,7 +62,7 @@ jobs: echo "${{ github.event.number }}" > .PR_NUMBER - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: benchmark-ssr path: | diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index bb034a4bc5a..3eccceb4a52 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -49,6 +49,10 @@ jobs: cache-dependency-path: js-framework-benchmark/package-lock.json - uses: Swatinem/rust-cache@v2 + - name: Setup chrome + uses: browser-actions/setup-chrome@v1 + with: + install-chromedriver: true - name: setup js-framework-benchmark working-directory: js-framework-benchmark @@ -120,7 +124,7 @@ jobs: EVENT_INFO: ${{ toJSON(github.event) }} - name: Upload result artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: results path: artifacts/ diff --git a/.github/workflows/build-api-docs.yml b/.github/workflows/build-api-docs.yml index 44a69b3fa0f..62085f2e875 100644 --- a/.github/workflows/build-api-docs.yml +++ b/.github/workflows/build-api-docs.yml @@ -46,7 +46,7 @@ jobs: cp -r target/doc/* api-docs/dist/next - name: Upload build artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: api-docs path: api-docs/ @@ -59,7 +59,7 @@ jobs: - if: github.event_name == 'pull_request' name: Upload pr info - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pr-info path: "${{ env.PR_INFO_FILE }}" diff --git a/.github/workflows/build-website.yml b/.github/workflows/build-website.yml index 742a5491a83..6cc7c7a4454 100644 --- a/.github/workflows/build-website.yml +++ b/.github/workflows/build-website.yml @@ -48,7 +48,7 @@ jobs: npm run build - name: Upload build artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: website path: website/build/ @@ -61,7 +61,7 @@ jobs: - if: github.event_name == 'pull_request' name: Upload pr info - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pr-info path: "${{ env.PR_INFO_FILE }}" diff --git a/.github/workflows/main-checks.yml b/.github/workflows/main-checks.yml index 955c4fb790a..a4f10943712 100644 --- a/.github/workflows/main-checks.yml +++ b/.github/workflows/main-checks.yml @@ -67,7 +67,7 @@ jobs: fail-fast: false matrix: toolchain: - - 1.64.0 + - 1.76.0 - stable steps: @@ -116,7 +116,7 @@ jobs: fail-fast: false matrix: toolchain: - - 1.64.0 + - 1.76.0 - stable - nightly diff --git a/.github/workflows/size-cmp.yml b/.github/workflows/size-cmp.yml index 066dbb287c0..efaa041d6ca 100644 --- a/.github/workflows/size-cmp.yml +++ b/.github/workflows/size-cmp.yml @@ -65,7 +65,7 @@ jobs: ISSUE_NUMBER: ${{ github.event.number }} - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: size-cmp-${{ matrix.target }}-info path: ".SIZE_CMP_INFO" diff --git a/Cargo.lock b/Cargo.lock index 19ff9ba03d7..33e4534cc09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,15 +43,16 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.1" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6cd65a4b849ace0b7f6daeebcc1a1d111282227ca745458c61dbf670e52a597" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] @@ -81,19 +82,19 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.0" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0238ca56c96dfa37bdf7c373c8886dd591322500aceeeccdb2216fe06dc2f796" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anyhow" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "anymap2" @@ -109,7 +110,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] @@ -117,8 +118,8 @@ name = "async_clock" version = "0.0.1" dependencies = [ "chrono", - "futures 0.3.29", - "gloo-net 0.4.0", + "futures 0.3.30", + "gloo-net 0.5.0", "yew", ] @@ -131,6 +132,12 @@ dependencies = [ "critical-section", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "autocfg" version = "1.1.0" @@ -139,9 +146,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "average" -version = "0.14.1" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d804c74bb2d66e9b7047658d21af0f1c937d7d2466410cbf1aed3b0c04048d4" +checksum = "3a237a6822e1c3c98e700b6db5b293eb341b7524dcb8d227941245702b7431dc" dependencies = [ "easy-cast", "float-ord", @@ -150,18 +157,19 @@ dependencies = [ [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "http", - "http-body", - "hyper", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "itoa", "matchit", "memchr", @@ -173,28 +181,33 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 1.0.1", "tokio", "tower", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -220,9 +233,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.5" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" @@ -341,17 +354,18 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.5.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.0.79" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -378,23 +392,23 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.31" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "wasm-bindgen", - "windows-targets 0.48.1", + "windows-targets 0.52.6", ] [[package]] name = "clap" -version = "4.4.7" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" +checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" dependencies = [ "clap_builder", "clap_derive", @@ -402,9 +416,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.7" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" +checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" dependencies = [ "anstream", "anstyle", @@ -415,21 +429,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.4.7" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "cobs" @@ -530,17 +544,6 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" -[[package]] -name = "core_affinity" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622892f5635ce1fc38c8f16dfc938553ed64af482edb5e150bf4caedbfcb2304" -dependencies = [ - "libc", - "num_cpus", - "winapi", -] - [[package]] name = "counter" version = "0.1.1" @@ -585,9 +588,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.14.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -595,27 +598,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] name = "darling_macro" -version = "0.14.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] @@ -635,46 +638,46 @@ dependencies = [ [[package]] name = "derive_builder" -version = "0.12.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.12.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d" dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] name = "derive_builder_macro" -version = "0.12.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b" dependencies = [ "derive_builder_core", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] name = "derive_more" -version = "0.99.17" +version = "0.99.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" dependencies = [ "convert_case", "proc-macro2", "quote", "rustc_version", - "syn 1.0.109", + "syn 2.0.72", ] [[package]] @@ -695,27 +698,27 @@ dependencies = [ [[package]] name = "divan" -version = "0.1.1" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9fe20b31e5a6a2c689cb9cd6b8ab3e1b417536b2369830b037acfee34b11469" +checksum = "a0d567df2c9c2870a43f3f2bd65aaeb18dbce1c18f217c3e564b4fbaeb3ee56c" dependencies = [ + "cfg-if", "clap", "condtype", - "core_affinity", "divan-macros", - "linkme", + "libc", "regex-lite", ] [[package]] name = "divan-macros" -version = "0.1.1" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c41656525d3cbca56bc91ca045ffb591b7b7d7bd7453750b63bacc35c46f3cc" +checksum = "27540baf49be0d484d8f0130d7d8da3011c32a44d4fc873368154f1510e574a2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] @@ -762,9 +765,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.10.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" +checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" dependencies = [ "humantime", "is-terminal", @@ -802,9 +805,9 @@ dependencies = [ [[package]] name = "fake" -version = "2.9.1" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26221445034074d46b276e13eb97a265ebdb8ed8da705c4dddd3dd20b66b45d2" +checksum = "1c25829bde82205da46e1823b2259db6273379f626fc211f126f65654a2669be" dependencies = [ "deunicode", "rand", @@ -812,12 +815,13 @@ dependencies = [ [[package]] name = "fancy-regex" -version = "0.11.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" +checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" dependencies = [ "bit-set", - "regex", + "regex-automata", + "regex-syntax", ] [[package]] @@ -833,7 +837,7 @@ dependencies = [ name = "file_upload" version = "0.1.0" dependencies = [ - "base64 0.21.5", + "base64 0.22.1", "gloo 0.11.0", "js-sys", "web-sys", @@ -934,9 +938,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" dependencies = [ "futures-channel", "futures-core", @@ -949,9 +953,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" dependencies = [ "futures-core", "futures-sink", @@ -959,15 +963,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" [[package]] name = "futures-executor" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" dependencies = [ "futures-core", "futures-task", @@ -976,38 +980,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" [[package]] name = "futures-macro" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] name = "futures-sink" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" [[package]] name = "futures-task" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" [[package]] name = "futures-util" -version = "0.3.29" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" dependencies = [ "futures-channel", "futures-core", @@ -1045,9 +1049,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.10" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" +checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" dependencies = [ "cfg-if", "js-sys", @@ -1064,9 +1068,9 @@ checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" [[package]] name = "git2" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" dependencies = [ "bitflags 2.4.0", "libc", @@ -1102,25 +1106,6 @@ dependencies = [ "gloo-worker 0.2.1", ] -[[package]] -name = "gloo" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd35526c28cc55c1db77aed6296de58677dbab863b118483a27845631d870249" -dependencies = [ - "gloo-console 0.3.0", - "gloo-dialogs 0.2.0", - "gloo-events 0.2.0", - "gloo-file 0.3.0", - "gloo-history 0.2.1", - "gloo-net 0.4.0", - "gloo-render 0.2.0", - "gloo-storage 0.3.0", - "gloo-timers 0.3.0", - "gloo-utils 0.2.0", - "gloo-worker 0.4.1", -] - [[package]] name = "gloo" version = "0.11.0" @@ -1131,7 +1116,7 @@ dependencies = [ "gloo-dialogs 0.2.0", "gloo-events 0.2.0", "gloo-file 0.3.0", - "gloo-history 0.2.1", + "gloo-history 0.2.0", "gloo-net 0.5.0", "gloo-render 0.2.0", "gloo-storage 0.3.0", @@ -1274,28 +1259,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils 0.1.7", - "http", - "js-sys", - "pin-project", - "serde", - "serde_json", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "gloo-net" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ac9e8288ae2c632fa9f8657ac70bfe38a1530f345282d7ba66a1f70b72b7dc4" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "gloo-utils 0.2.0", - "http", + "http 0.2.9", "js-sys", "pin-project", "serde", @@ -1316,7 +1280,7 @@ dependencies = [ "futures-core", "futures-sink", "gloo-utils 0.2.0", - "http", + "http 0.2.9", "js-sys", "pin-project", "serde", @@ -1442,25 +1406,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "gloo-worker" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cbd4c35cc3a2b1fb792318acc06bd514193f6d058173da5cdbcdabe6514303" -dependencies = [ - "bincode", - "futures 0.3.29", - "gloo-utils 0.2.0", - "gloo-worker-macros", - "js-sys", - "pinned", - "serde", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "gloo-worker" version = "0.5.0" @@ -1468,7 +1413,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "085f262d7604911c8150162529cefab3782e91adb20202e8658f7275d2aefe5d" dependencies = [ "bincode", - "futures 0.3.29", + "futures 0.3.30", "gloo-utils 0.2.0", "gloo-worker-macros", "js-sys", @@ -1489,22 +1434,41 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] name = "h2" -version = "0.3.20" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 1.9.3", + "http 0.2.9", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "h2" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http 1.1.0", + "indexmap", "slab", "tokio", "tokio-util", @@ -1520,12 +1484,6 @@ dependencies = [ "byteorder", ] -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.14.1" @@ -1542,7 +1500,7 @@ dependencies = [ "bitflags 1.3.2", "bytes", "headers-core", - "http", + "http 0.2.9", "httpdate", "mime", "sha1", @@ -1554,7 +1512,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" dependencies = [ - "http", + "http 0.2.9", ] [[package]] @@ -1577,6 +1535,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.2.6" @@ -1612,6 +1576,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.5" @@ -1619,15 +1594,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "http", + "http 0.2.9", + "pin-project-lite", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] [[package]] name = "http-range-header" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" +checksum = "08a397c49fec283e3d6211adbe480be95aae5f304cfb923e9970e08956d5168a" [[package]] name = "httparse" @@ -1649,39 +1647,100 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.27" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.26", + "http 0.2.9", + "http-body 0.4.5", "httparse", "httpdate", "itoa", "pin-project-lite", - "socket2 0.4.9", + "socket2", "tokio", "tower-service", "tracing", "want", ] +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155" +dependencies = [ + "futures-util", + "http 1.1.0", + "hyper 1.4.1", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + [[package]] name = "hyper-tls" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", - "hyper", + "http-body-util", + "hyper 1.4.1", + "hyper-util", "native-tls", "tokio", "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab92f4f49ee4fb4f997c784b7a2e0fa70050211e0b6a287f898c3c9785ca956" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", + "pin-project-lite", + "socket2", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -1735,12 +1794,12 @@ dependencies = [ [[package]] name = "implicit-clone" -version = "0.4.8" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc06a255cbf402a52ae399c05a518c68c569c916ea11423620111df576b9b9bb" +checksum = "1bd41bf647018e1da0e32dac34d02135d61d7204cee650e4633eddbd0b23ec38" dependencies = [ "implicit-clone-derive", - "indexmap 2.0.2", + "indexmap", ] [[package]] @@ -1750,34 +1809,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9311685eb9a34808bbb0608ad2fcab9ae216266beca5848613e95553ac914e3b" dependencies = [ "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.0.2" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" dependencies = [ "equivalent", - "hashbrown 0.14.1", + "hashbrown", ] [[package]] name = "indicatif" -version = "0.17.7" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb28741c9db9a713d93deb3bb9515c20788cef5815265bee4980e87bde7e0f25" +checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" dependencies = [ "console", "instant", @@ -1797,9 +1846,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", "js-sys", @@ -1836,11 +1885,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" -version = "0.10.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -1873,9 +1928,9 @@ dependencies = [ [[package]] name = "jobserver" -version = "0.1.26" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] @@ -1904,9 +1959,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] @@ -1950,9 +2005,9 @@ checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libgit2-sys" -version = "0.16.2+1.7.2" +version = "0.17.0+1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4126d8b4ee5c9d9ea891dd875cfdc1e9d0950437179104b183d7d8a74d24e8" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" dependencies = [ "cc", "libc", @@ -1994,26 +2049,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linkme" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ed2ee9464ff9707af8e9ad834cffa4802f072caad90639c583dd3c62e6e608" -dependencies = [ - "linkme-impl", -] - -[[package]] -name = "linkme-impl" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125974b109d512fccbc6c0244e7580143e460895dfd6ea7f8bbb692fd94396" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.38", -] - [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -2028,9 +2063,9 @@ checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lipsum" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5e9ef2d2ad6fe67a59ace27c203c8d3a71d195532ee82e3bbe0d5f9a9ca541" +checksum = "636860251af8963cc40f6b4baadee105f02e21b28131d76eba8e40ce84ab8064" dependencies = [ "rand", "rand_chacha", @@ -2048,9 +2083,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "matchit" @@ -2119,7 +2154,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http", + "http 0.2.9", "httparse", "log", "memchr", @@ -2172,6 +2207,12 @@ dependencies = [ "yew", ] +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + [[package]] name = "num-traits" version = "0.2.15" @@ -2209,15 +2250,15 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "openssl" -version = "0.10.60" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.4.0", "cfg-if", @@ -2236,7 +2277,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] @@ -2247,9 +2288,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.96" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", @@ -2259,9 +2300,9 @@ dependencies = [ [[package]] name = "papergrid" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ccbe15f2b6db62f9a9871642746427e297b0ceb85f9a7f1ee5ff47d184d0c8" +checksum = "9ad43c07024ef767f9160710b3a6773976194758c7919b17e63b863db0bdf7fb" dependencies = [ "bytecount", "fnv", @@ -2327,7 +2368,7 @@ checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] @@ -2348,7 +2389,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a829027bd95e54cfe13e3e258a1ae7b645960553fb82b75ff852c29688ee595b" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "rustversion", "thiserror", ] @@ -2400,19 +2441,19 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] name = "primes" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a61082d8bceecd71a3870e9162002bb75f7ba9c7aa8b76227e887782fef9c8" +checksum = "0466ef49edd4a5a4bc9d62804a34e89366810bd8bfc3ed537101e3d099f245c5" [[package]] name = "proc-macro-crate" @@ -2450,9 +2491,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -2472,7 +2513,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03b55e106e5791fa5a13abd13c85d6127312e8e09098059ca2bc9b03ca4cf488" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "gloo 0.8.1", "num_cpus", "once_cell", @@ -2485,26 +2526,20 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.9.3" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a1a2f1f0a7ecff9c31abbe177637be0e97a0aef46cf8738ece09327985d998" +checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "memchr", "unicase", ] -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -2550,9 +2585,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.2" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -2562,9 +2597,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.3" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -2585,20 +2620,24 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.22" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" +checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ - "base64 0.21.5", + "base64 0.22.1", "bytes", "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", + "h2 0.4.5", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-rustls", "hyper-tls", + "hyper-util", "ipnet", "js-sys", "log", @@ -2607,9 +2646,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", + "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", + "sync_wrapper 1.0.1", "system-configuration", "tokio", "tokio-native-tls", @@ -2621,6 +2662,21 @@ dependencies = [ "winreg", ] +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "route-recognizer" version = "0.3.1" @@ -2686,20 +2742,51 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rustls" +version = "0.23.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + [[package]] name = "rustls-pemfile" -version = "1.0.3" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" +checksum = "196fe16b00e106300d3e45ecfcb764fa292a535d7326a29a5875c579c7417425" dependencies = [ - "base64 0.21.5", + "base64 0.22.1", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" + +[[package]] +name = "rustls-webpki" +version = "0.102.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6b52d4fda176fd835fdc55a835d4a89b8499cad995885a21149d5ad62f852e" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", ] [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" @@ -2753,15 +2840,15 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.20" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d3c334ca1ee894a2c6f6ad698fe8c435b76d504b13d436f0685d648d6d96f7" +checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" dependencies = [ "serde_derive", ] @@ -2790,20 +2877,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.190" +version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c5609f394e5c2bd7fc51efda478004ea80ef42fee983d5c67a65e34f32c0e3" +checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" +checksum = "cb0652c533506ad7a2e353cce269330d6afd8bdfb6d75e0ace5b35aacbd7b9e9" dependencies = [ "itoa", "ryu", @@ -2857,7 +2944,7 @@ version = "0.1.0" dependencies = [ "bytes", "clap", - "futures 0.3.29", + "futures 0.3.30", "log", "reqwest", "serde", @@ -2880,28 +2967,18 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.5" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2921,8 +2998,9 @@ dependencies = [ "clap", "env_logger", "function_router", - "futures 0.3.29", - "hyper", + "futures 0.3.30", + "hyper 1.4.1", + "hyper-util", "jemallocator", "log", "tokio", @@ -2941,37 +3019,43 @@ checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.25.0" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.25.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck", + "heck 0.5.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.38", + "syn 2.0.72", ] +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + [[package]] name = "suspense" version = "0.1.0" dependencies = [ - "gloo 0.10.0", + "gloo 0.11.0", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2991,9 +3075,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.38" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -3006,6 +3090,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + [[package]] name = "system-configuration" version = "0.5.1" @@ -3029,9 +3119,9 @@ dependencies = [ [[package]] name = "tabled" -version = "0.14.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfe9c3632da101aba5131ed63f9eed38665f8b3c68703a6bb18124835c1a5d22" +checksum = "4c998b0c8b921495196a48aabaf1901ff28be0760136e31604f7967b0792050e" dependencies = [ "papergrid", "tabled_derive", @@ -3040,11 +3130,11 @@ dependencies = [ [[package]] name = "tabled_derive" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99f688a08b54f4f02f0a3c382aefdb7884d3d69609f785bd253dc033243e3fe4" +checksum = "4c138f99377e5d653a371cdad263615634cfc8467685dfe8e73e2b8e98f44b17" dependencies = [ - "heck", + "heck 0.4.1", "proc-macro-error", "proc-macro2", "quote", @@ -3086,31 +3176,32 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "6e3de26b0965292219b4287ff031fcba86837900fe9cd2b34ea8ad893c0953d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "268026685b2be38d7103e9e507c938a1fcb3d7e6eb15e87870b617bf37b6d581" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] name = "time" -version = "0.3.30" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ "deranged", + "num-conv", "powerfmt", "serde", "time-core", @@ -3136,7 +3227,7 @@ dependencies = [ name = "timer_functional" version = "0.1.0" dependencies = [ - "gloo 0.10.0", + "gloo 0.11.0", "js-sys", "yew", ] @@ -3171,9 +3262,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.35.0" +version = "1.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" +checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" dependencies = [ "backtrace", "bytes", @@ -3183,20 +3274,20 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.5", + "socket2", "tokio-macros", "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] @@ -3209,6 +3300,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.14" @@ -3222,9 +3324,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" dependencies = [ "futures-util", "log", @@ -3258,7 +3360,7 @@ version = "0.19.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" dependencies = [ - "indexmap 2.0.2", + "indexmap", "toml_datetime", "winnow", ] @@ -3281,16 +3383,16 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "bytes", - "futures-core", "futures-util", - "http", - "http-body", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", "http-range-header", "httpdate", "mime", @@ -3301,6 +3403,7 @@ dependencies = [ "tokio-util", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -3335,7 +3438,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] @@ -3355,9 +3458,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.85" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "196a58260a906cedb9bf6d8034b6379d0c11f552416960452f267402ceeddff1" +checksum = "8419ecd263363827c5730386f418715766f584e2f874d32c23c5b00bd9727e7e" dependencies = [ "basic-toml", "glob", @@ -3370,14 +3473,14 @@ dependencies = [ [[package]] name = "tungstenite" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" dependencies = [ "byteorder", "bytes", "data-encoding", - "http", + "http 1.1.0", "httparse", "log", "rand", @@ -3437,6 +3540,12 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.4.0" @@ -3474,9 +3583,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.5.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "serde", ] @@ -3504,29 +3613,27 @@ dependencies = [ [[package]] name = "warp" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e92e22e03ff1230c03a1a8ee37d2f89cd489e2e541b7550d6afad96faed169" +checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" dependencies = [ "bytes", "futures-channel", "futures-util", "headers", - "http", - "hyper", + "http 0.2.9", + "hyper 0.14.30", "log", "mime", "mime_guess", "multer", "percent-encoding", "pin-project", - "rustls-pemfile", "scoped-tls", "serde", "serde_json", "serde_urlencoded", "tokio", - "tokio-stream", "tokio-tungstenite", "tokio-util", "tower-service", @@ -3555,9 +3662,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3565,24 +3672,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ "cfg-if", "js-sys", @@ -3592,9 +3699,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3602,28 +3709,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "wasm-bindgen-test" -version = "0.3.37" +version = "0.3.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e6e302a7ea94f83a6d09e78e7dc7d9ca7b186bc2829c24a22d0753efd680671" +checksum = "d9bf62a58e0780af3e852044583deee40983e5886da43a271dd772379987667b" dependencies = [ "console_error_panic_hook", "js-sys", @@ -3635,12 +3742,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-test-macro" -version = "0.3.37" +version = "0.3.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecb993dd8c836930ed130e020e77d9b2e65dd0fbab1b67c790b0f5d80b11a575" +checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", + "syn 2.0.72", ] [[package]] @@ -3656,9 +3764,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -3788,6 +3896,15 @@ dependencies = [ "windows-targets 0.48.1", ] +[[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-targets" version = "0.42.2" @@ -3818,6 +3935,22 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[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" @@ -3830,6 +3963,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[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" @@ -3842,6 +3981,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -3854,6 +3999,18 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[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.42.2" @@ -3866,6 +4023,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[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.42.2" @@ -3878,6 +4041,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[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" @@ -3890,6 +4059,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[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" @@ -3902,6 +4077,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winnow" version = "0.5.4" @@ -3913,9 +4094,9 @@ dependencies = [ [[package]] name = "winreg" -version = "0.50.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ "cfg-if", "windows-sys 0.48.0", @@ -3928,11 +4109,11 @@ dependencies = [ "base64ct", "bincode", "console_error_panic_hook", - "futures 0.3.29", + "futures 0.3.30", "gloo 0.11.0", "html-escape", "implicit-clone", - "indexmap 2.0.2", + "indexmap", "js-sys", "prokio", "rustversion", @@ -3953,8 +4134,8 @@ dependencies = [ name = "yew-agent" version = "0.3.0" dependencies = [ - "futures 0.3.29", - "gloo-worker 0.4.1", + "futures 0.3.30", + "gloo-worker 0.5.0", "serde", "wasm-bindgen", "yew", @@ -3968,7 +4149,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.38", + "syn 2.0.72", "trybuild", "yew-agent", ] @@ -3981,7 +4162,7 @@ checksum = "58865a8f2470a6ad839274e05c9627170d32930f39a2348f8c425880a6131792" dependencies = [ "proc-macro2", "quote", - "syn 2.0.38", + "syn 2.0.72", ] [[package]] @@ -3994,7 +4175,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.38", + "syn 2.0.72", "trybuild", "yew", ] @@ -4024,7 +4205,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.38", + "syn 2.0.72", "trybuild", "yew-router", ] @@ -4046,25 +4227,32 @@ dependencies = [ name = "yew-worker-prime" version = "0.1.0" dependencies = [ - "futures 0.3.29", + "futures 0.3.30", "primes", "serde", "yew", "yew-agent", ] +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + [[package]] name = "zxcvbn" -version = "2.2.2" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "103fa851fff70ea29af380e87c25c48ff7faac5c530c70bd0e65366d4e0c94e4" +checksum = "ad76e35b00ad53688d6b90c431cabe3cbf51f7a4a154739e04b63004ab1c736c" dependencies = [ + "chrono", "derive_builder", "fancy-regex", "itertools", - "js-sys", "lazy_static", - "quick-error", "regex", "time", + "wasm-bindgen", + "web-sys", ] diff --git a/Cargo.toml b/Cargo.toml index 386379907df..b3015e5882b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,3 +14,4 @@ lto = true codegen-units = 1 panic = "abort" opt-level = 3 + diff --git a/ci/build-examples.sh b/ci/build-examples.sh index 2bc3f56b184..69a0029d14b 100755 --- a/ci/build-examples.sh +++ b/ci/build-examples.sh @@ -33,7 +33,7 @@ for path in examples/*; do export RUSTFLAGS="-Zshare-generics=n -Clto=thin $RUSTFLAGS" fi - trunk build --release --dist "$dist_dir" --public-url "$PUBLIC_URL_PREFIX$example" + trunk build --release --dist "$dist_dir" --public-url "$PUBLIC_URL_PREFIX/$example" # check that there are no undefined symbols. Those generate an import .. from 'env', # which isn't available in the browser. diff --git a/examples/async_clock/Cargo.toml b/examples/async_clock/Cargo.toml index c648b83031a..645542818fa 100644 --- a/examples/async_clock/Cargo.toml +++ b/examples/async_clock/Cargo.toml @@ -9,4 +9,4 @@ license = "MIT OR Apache-2.0" yew = { path = "../../packages/yew", features = ["csr"] } chrono = "0.4" futures = "0.3" -gloo-net = "0.4" +gloo-net = "0.5" diff --git a/examples/dyn_create_destroy_apps/Cargo.toml b/examples/dyn_create_destroy_apps/Cargo.toml index 06f9322bbd2..31f8dcd9882 100644 --- a/examples/dyn_create_destroy_apps/Cargo.toml +++ b/examples/dyn_create_destroy_apps/Cargo.toml @@ -13,5 +13,5 @@ gloo = "0.11" wasm-bindgen = "0.2" [dependencies.web-sys] -version = "0.3.64" +version = "0.3.69" features = ["Document", "Element", "Node", "DomTokenList"] diff --git a/examples/file_upload/Cargo.toml b/examples/file_upload/Cargo.toml index 3322afc43b9..be7408989b2 100644 --- a/examples/file_upload/Cargo.toml +++ b/examples/file_upload/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" [dependencies] js-sys = "0.3" yew = { path = "../../packages/yew", features = ["csr"] } -base64 = "0.21.5" +base64 = "0.22.1" gloo = "0.11" [dependencies.web-sys] diff --git a/examples/function_memory_game/Cargo.toml b/examples/function_memory_game/Cargo.toml index 125166cd3d9..24b7a9324a0 100644 --- a/examples/function_memory_game/Cargo.toml +++ b/examples/function_memory_game/Cargo.toml @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0" [dependencies] serde = { version = "1.0", features = ["derive"] } -strum = "0.25" -strum_macros = "0.25" +strum = "0.26" +strum_macros = "0.26" gloo = "0.11" nanoid = "0.4" rand = "0.8" diff --git a/examples/function_router/Cargo.toml b/examples/function_router/Cargo.toml index 74bb4c6a4f2..0dd0cfdd201 100644 --- a/examples/function_router/Cargo.toml +++ b/examples/function_router/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -lipsum = "0.9.0" +lipsum = "0.9.1" log = "0.4" rand = { version = "0.8", features = ["small_rng"] } yew = { path = "../../packages/yew" } diff --git a/examples/function_todomvc/Cargo.toml b/examples/function_todomvc/Cargo.toml index ebc10615001..6e6bdb02cc4 100644 --- a/examples/function_todomvc/Cargo.toml +++ b/examples/function_todomvc/Cargo.toml @@ -7,8 +7,8 @@ license = "MIT OR Apache-2.0" [dependencies] serde = { version = "1.0", features = ["derive"] } -strum = "0.25" -strum_macros = "0.25" +strum = "0.26" +strum_macros = "0.26" gloo = "0.11" yew = { path = "../../packages/yew", features = ["csr"] } diff --git a/examples/function_todomvc/src/components/entry.rs b/examples/function_todomvc/src/components/entry.rs index 4df733ff159..98f04444c03 100644 --- a/examples/function_todomvc/src/components/entry.rs +++ b/examples/function_todomvc/src/components/entry.rs @@ -19,7 +19,7 @@ pub fn entry(props: &EntryProps) -> Html { let mut class = Classes::from("todo"); // We use the `use_bool_toggle` hook and set the default value to `false` - // as the default we are not editing the the entry. When we want to edit the + // as the default we are not editing the entry. When we want to edit the // entry we can call the toggle method on the `UseBoolToggleHandle` // which will trigger a re-render with the toggle value being `true` for that // render and after that render the value of toggle will be flipped back to diff --git a/examples/immutable/Cargo.toml b/examples/immutable/Cargo.toml index df3a2b41b0f..d8902c3652e 100644 --- a/examples/immutable/Cargo.toml +++ b/examples/immutable/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -implicit-clone = { version = "0.4", features = ["map"] } +implicit-clone = { version = "0.5", features = ["map"] } wasm-bindgen = "0.2" web-sys = "0.3" yew = { path = "../../packages/yew", features = ["csr"] } diff --git a/examples/keyed_list/Cargo.toml b/examples/keyed_list/Cargo.toml index 3b1b9eeb4c6..f207c4ea9c5 100644 --- a/examples/keyed_list/Cargo.toml +++ b/examples/keyed_list/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -fake = "2.9.1" +fake = "2.9.2" getrandom = { version = "0.2", features = ["js"] } instant = { version = "0.1", features = ["wasm-bindgen"] } log = "0.4" diff --git a/examples/password_strength/Cargo.toml b/examples/password_strength/Cargo.toml index a61491eec51..7dbfd972904 100644 --- a/examples/password_strength/Cargo.toml +++ b/examples/password_strength/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] yew = { path = "../../packages/yew", features = ["csr"] } -zxcvbn = "2.2.2" -time = "0.3.30" +zxcvbn = "3.1.0" +time = "0.3.36" js-sys = "0.3.64" web-sys = { version = "0.3", features = ["Event","EventTarget","InputEvent"] } wasm-bindgen = "0.2" diff --git a/examples/password_strength/src/app.rs b/examples/password_strength/src/app.rs index 3ffbcfe58ae..72e4854887a 100644 --- a/examples/password_strength/src/app.rs +++ b/examples/password_strength/src/app.rs @@ -17,17 +17,16 @@ pub struct App { } impl App { - fn get_estimate(&self) -> Option { - zxcvbn(&self.password, &[]) - .ok() - .map(|estimate| estimate.score()) + fn get_estimate(&self) -> u8 { + let score = zxcvbn(&self.password, &[]).score(); + score.into() } fn redout_top_row_text(&self) -> String { if self.password.is_empty() { return "Provide a password".to_string(); } - let estimate_text = match self.get_estimate().unwrap_or(0) { + let estimate_text = match self.get_estimate() { 0 => "That's a password?", 1 => "You can do a lot better.", 2 => "Meh", diff --git a/examples/router/Cargo.toml b/examples/router/Cargo.toml index b6d9cc65937..0c96778db32 100644 --- a/examples/router/Cargo.toml +++ b/examples/router/Cargo.toml @@ -6,7 +6,7 @@ license = "MIT OR Apache-2.0" [dependencies] instant = { version = "0.1", features = ["wasm-bindgen"] } -lipsum = "0.9.0" +lipsum = "0.9.1" log = "0.4" getrandom = { version = "0.2", features = ["js"] } rand = { version = "0.8", features = ["small_rng"] } diff --git a/examples/simple_ssr/Cargo.toml b/examples/simple_ssr/Cargo.toml index cb602eb4e70..b4c93299a21 100644 --- a/examples/simple_ssr/Cargo.toml +++ b/examples/simple_ssr/Cargo.toml @@ -14,11 +14,11 @@ required-features = ["ssr"] [dependencies] yew = { path = "../../packages/yew" } -reqwest = { version = "0.11.22", features = ["json"] } -serde = { version = "1.0.190", features = ["derive"] } -uuid = { version = "1.5.0", features = ["serde"] } +reqwest = { version = "0.12.5", features = ["json"] } +serde = { version = "1.0.193", features = ["derive"] } +uuid = { version = "1.10.0", features = ["serde"] } futures = "0.3" -bytes = "1.5" +bytes = "1.7" [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen-futures = "0.4" @@ -26,7 +26,7 @@ wasm-logger = "0.2" log = "0.4" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -tokio = { version = "1.33.0", features = ["full"] } +tokio = { version = "1.38.1", features = ["full"] } warp = "0.3" clap = { version = "4", features = ["derive"] } diff --git a/examples/ssr_router/Cargo.toml b/examples/ssr_router/Cargo.toml index 84a23c63653..dd5908a2f78 100644 --- a/examples/ssr_router/Cargo.toml +++ b/examples/ssr_router/Cargo.toml @@ -18,19 +18,20 @@ yew = { path = "../../packages/yew" } function_router = { path = "../function_router" } log = "0.4" futures = { version = "0.3", features = ["std"], default-features = false } +hyper-util = "0.1.6" [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen-futures = "0.4" wasm-logger = "0.2" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] -tokio = { version = "1.33.0", features = ["full"] } -axum = "0.6" +tokio = { version = "1.38.1", features = ["full"] } +axum = "0.7" tower = { version = "0.4", features = ["make"] } -tower-http = { version = "0.3", features = ["fs"] } +tower-http = { version = "0.5", features = ["fs"] } env_logger = "0.10" clap = { version = "4", features = ["derive"] } -hyper = { version = "0.14", features = ["server", "http1"] } +hyper = { version = "1.4", features = ["server", "http1"] } [target.'cfg(unix)'.dependencies] jemallocator = "0.5" diff --git a/examples/ssr_router/src/bin/ssr_router_server.rs b/examples/ssr_router/src/bin/ssr_router_server.rs index 9ecd2c57c99..5a25266302a 100644 --- a/examples/ssr_router/src/bin/ssr_router_server.rs +++ b/examples/ssr_router/src/bin/ssr_router_server.rs @@ -1,21 +1,24 @@ use std::collections::HashMap; use std::convert::Infallible; use std::future::Future; +use std::net::SocketAddr; use std::path::PathBuf; -use axum::body::StreamBody; -use axum::error_handling::HandleError; -use axum::extract::{Query, State}; +use axum::body::Body; +use axum::extract::{Query, Request, State}; use axum::handler::HandlerWithoutStateExt; -use axum::http::{StatusCode, Uri}; +use axum::http::Uri; use axum::response::IntoResponse; use axum::routing::get; use axum::Router; use clap::Parser; use function_router::{ServerApp, ServerAppProps}; use futures::stream::{self, StreamExt}; -use hyper::server::Server; -use tower::ServiceExt; +use hyper::body::Incoming; +use hyper_util::rt::TokioIo; +use hyper_util::server; +use tokio::net::TcpListener; +use tower::Service; use tower_http::services::ServeDir; use yew::platform::Runtime; @@ -44,7 +47,7 @@ async fn render( queries, }); - StreamBody::new( + Body::from_stream( stream::once(async move { index_html_before }) .chain(renderer.render_stream()) .chain(stream::once(async move { index_html_after })) @@ -75,7 +78,7 @@ where } #[tokio::main] -async fn main() { +async fn main() -> Result<(), Box> { let exec = Executor::default(); env_logger::init(); @@ -92,30 +95,61 @@ async fn main() { let index_html_after = index_html_after.to_owned(); - let handle_error = |e| async move { - ( - StatusCode::INTERNAL_SERVER_ERROR, - format!("error occurred: {e}"), - ) - }; - - let app = Router::new().fallback_service(HandleError::new( + let app = Router::new().fallback_service( ServeDir::new(opts.dir) .append_index_html_on_directories(false) .fallback( get(render) .with_state((index_html_before.clone(), index_html_after.clone())) - .into_service() - .map_err(|err| -> std::io::Error { match err {} }), + .into_service(), ), - handle_error, - )); + ); + + let addr: SocketAddr = ([127, 0, 0, 1], 8080).into(); println!("You can view the website at: http://localhost:8080/"); - Server::bind(&"127.0.0.1:8080".parse().unwrap()) - .executor(exec) - .serve(app.into_make_service()) - .await - .unwrap(); + let listener = TcpListener::bind(addr).await?; + + // Continuously accept new connections. + loop { + // In this example we discard the remote address. See `fn serve_with_connect_info` for how + // to expose that. + let (socket, _remote_addr) = listener.accept().await.unwrap(); + + // We don't need to call `poll_ready` because `Router` is always ready. + let tower_service = app.clone(); + + let exec = exec.clone(); + // Spawn a task to handle the connection. That way we can handle multiple connections + // concurrently. + tokio::spawn(async move { + // Hyper has its own `AsyncRead` and `AsyncWrite` traits and doesn't use tokio. + // `TokioIo` converts between them. + let socket = TokioIo::new(socket); + + // Hyper also has its own `Service` trait and doesn't use tower. We can use + // `hyper::service::service_fn` to create a hyper `Service` that calls our app through + // `tower::Service::call`. + let hyper_service = hyper::service::service_fn(move |request: Request| { + // We have to clone `tower_service` because hyper's `Service` uses `&self` whereas + // tower's `Service` requires `&mut self`. + // + // We don't need to call `poll_ready` since `Router` is always ready. + tower_service.clone().call(request) + }); + + // `server::conn::auto::Builder` supports both http1 and http2. + // + // `TokioExecutor` tells hyper to use `tokio::spawn` to spawn tasks. + if let Err(err) = server::conn::auto::Builder::new(exec) + // `serve_connection_with_upgrades` is required for websockets. If you don't need + // that you can use `serve_connection` instead. + .serve_connection_with_upgrades(socket, hyper_service) + .await + { + eprintln!("failed to serve connection: {err:#}"); + } + }); + } } diff --git a/examples/suspense/Cargo.toml b/examples/suspense/Cargo.toml index 170984be100..d8ff4f9252c 100644 --- a/examples/suspense/Cargo.toml +++ b/examples/suspense/Cargo.toml @@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0" [dependencies] yew = { path = "../../packages/yew", features = ["csr"] } -gloo = { version = "0.10", features = ["futures"] } +gloo = { version = "0.11", features = ["futures"] } wasm-bindgen-futures = "0.4" wasm-bindgen = "0.2" diff --git a/examples/timer_functional/Cargo.toml b/examples/timer_functional/Cargo.toml index aaa13975bf2..a546d1f296c 100644 --- a/examples/timer_functional/Cargo.toml +++ b/examples/timer_functional/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -gloo = "0.10.0" +gloo = "0.11.0" js-sys = "0.3.64" yew = { path = "../../packages/yew", features = ["csr"] } diff --git a/examples/todomvc/Cargo.toml b/examples/todomvc/Cargo.toml index 41b3637761d..e8ded16f036 100644 --- a/examples/todomvc/Cargo.toml +++ b/examples/todomvc/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" license = "MIT OR Apache-2.0" [dependencies] -strum = "0.25" -strum_macros = "0.25" +strum = "0.26" +strum_macros = "0.26" serde = "1" serde_derive = "1" yew = { path = "../../packages/yew", features = ["csr"] } diff --git a/examples/todomvc/src/main.rs b/examples/todomvc/src/main.rs index 2024805290d..4cd1aed36bd 100644 --- a/examples/todomvc/src/main.rs +++ b/examples/todomvc/src/main.rs @@ -73,7 +73,7 @@ impl Component for App { .filter(|e| self.state.filter.fits(e)) .nth(idx) .unwrap(); - self.state.edit_value = entry.description.clone(); + self.state.edit_value.clone_from(&entry.description); self.state.clear_all_edit(); self.state.toggle_edit(idx); } diff --git a/examples/web_worker_prime/Cargo.toml b/examples/web_worker_prime/Cargo.toml index f33cdccf54e..d3f998db5f5 100644 --- a/examples/web_worker_prime/Cargo.toml +++ b/examples/web_worker_prime/Cargo.toml @@ -6,6 +6,6 @@ edition = "2021" [dependencies] yew-agent = { path = "../../packages/yew-agent" } yew = { path = "../../packages/yew", features = ["csr"] } -futures = "0.3.29" -primes = "0.3.0" -serde = { version = "1.0.190", features = ["derive"] } +futures = "0.3.30" +primes = "0.4.0" +serde = { version = "1.0.193", features = ["derive"] } diff --git a/packages/yew-agent-macro/Cargo.toml b/packages/yew-agent-macro/Cargo.toml index 149198c5cee..383213dcdd0 100644 --- a/packages/yew-agent-macro/Cargo.toml +++ b/packages/yew-agent-macro/Cargo.toml @@ -2,7 +2,7 @@ name = "yew-agent-macro" version = "0.2.0" edition = "2021" -rust-version = "1.64.0" +rust-version = "1.76.0" authors = ["Kaede Hoshikawa "] repository = "https://github.com/yewstack/yew" homepage = "https://yew.rs" diff --git a/packages/yew-agent/Cargo.toml b/packages/yew-agent/Cargo.toml index 2007b54f86f..8848161b16f 100644 --- a/packages/yew-agent/Cargo.toml +++ b/packages/yew-agent/Cargo.toml @@ -9,15 +9,15 @@ edition = "2021" readme = "../../README.md" description = "Agents for Yew" license = "MIT OR Apache-2.0" -rust-version = "1.64.0" +rust-version = "1.76.0" [dependencies] yew = { version = "0.21.0", path = "../yew" } -gloo-worker = { version = "0.4", features = ["futures"] } +gloo-worker = { version = "0.5", features = ["futures"] } wasm-bindgen = "0.2" serde = { version = "1", features = ["derive"] } futures = "0.3" yew-agent-macro = { version = "0.2", path = "../yew-agent-macro" } [dev-dependencies] -serde = "1.0.190" +serde = "1.0.193" diff --git a/packages/yew-macro/Cargo.toml b/packages/yew-macro/Cargo.toml index 9d497486b92..7825f2850f7 100644 --- a/packages/yew-macro/Cargo.toml +++ b/packages/yew-macro/Cargo.toml @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0" keywords = ["web", "wasm", "frontend", "webasm", "webassembly"] categories = ["gui", "web-programming", "wasm"] description = "A framework for making client-side single-page apps" -rust-version = "1.64.0" +rust-version = "1.76.0" [lib] proc-macro = true @@ -28,3 +28,7 @@ prettyplease = "0.2" rustversion = "1" trybuild = "1" yew = { path = "../yew" } + +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(nightly_yew)'] } + diff --git a/packages/yew-macro/Makefile.toml b/packages/yew-macro/Makefile.toml index b679fa4fa51..f1a5a6ad133 100644 --- a/packages/yew-macro/Makefile.toml +++ b/packages/yew-macro/Makefile.toml @@ -1,6 +1,6 @@ [tasks.test] clear = true -toolchain = "1.64.0" +toolchain = "1.76.0" command = "cargo" # test target can be optionally specified like `cargo make test html_macro`, args = ["test", "${@}"] diff --git a/packages/yew-macro/src/derive_props/field.rs b/packages/yew-macro/src/derive_props/field.rs index 37dc28c8bc3..da2af9ee97c 100644 --- a/packages/yew-macro/src/derive_props/field.rs +++ b/packages/yew-macro/src/derive_props/field.rs @@ -12,7 +12,7 @@ use crate::derive_props::generics::push_type_param; #[allow(clippy::large_enum_variant)] #[derive(PartialEq, Eq)] -enum PropAttr { +pub enum PropAttr { Required { wrapped_name: Ident }, PropOr(Expr), PropOrElse(Expr), @@ -21,9 +21,9 @@ enum PropAttr { #[derive(Eq)] pub struct PropField { - ty: Type, + pub ty: Type, name: Ident, - attr: PropAttr, + pub attr: PropAttr, extra_attrs: Vec, } diff --git a/packages/yew-macro/src/derive_props/mod.rs b/packages/yew-macro/src/derive_props/mod.rs index db18527222f..017f3fd7fb2 100644 --- a/packages/yew-macro/src/derive_props/mod.rs +++ b/packages/yew-macro/src/derive_props/mod.rs @@ -10,9 +10,16 @@ use field::PropField; use proc_macro2::{Ident, Span}; use quote::{format_ident, quote, ToTokens}; use syn::parse::{Parse, ParseStream, Result}; -use syn::{Attribute, DeriveInput, Generics, Visibility}; +use syn::punctuated::Pair; +use syn::visit_mut::VisitMut; +use syn::{ + AngleBracketedGenericArguments, Attribute, ConstParam, DeriveInput, GenericArgument, + GenericParam, Generics, Path, PathArguments, PathSegment, Type, TypeParam, TypePath, + Visibility, +}; use wrapper::PropsWrapper; +use self::field::PropAttr; use self::generics::to_arguments; pub struct DerivePropsInput { @@ -23,6 +30,76 @@ pub struct DerivePropsInput { preserved_attrs: Vec, } +/// AST visitor that replaces all occurences of the keyword `Self` with `new_self` +struct Normaliser<'ast> { + new_self: &'ast Ident, + generics: &'ast Generics, + /// `Option` for one-time initialisation + new_self_full: Option, +} + +impl<'ast> Normaliser<'ast> { + pub fn new(new_self: &'ast Ident, generics: &'ast Generics) -> Self { + Self { + new_self, + generics, + new_self_full: None, + } + } + + fn get_new_self(&mut self) -> PathSegment { + self.new_self_full + .get_or_insert_with(|| { + PathSegment { + ident: self.new_self.clone(), + arguments: if self.generics.lt_token.is_some() { + PathArguments::AngleBracketed(AngleBracketedGenericArguments { + colon2_token: Some(Default::default()), + lt_token: Default::default(), + args: self + .generics + .params + .pairs() + .map(|pair| { + let (value, punct) = pair.cloned().into_tuple(); + let value = match value { + GenericParam::Lifetime(param) => { + GenericArgument::Lifetime(param.lifetime) + } + GenericParam::Type(TypeParam { ident, .. }) + | GenericParam::Const(ConstParam { ident, .. }) => { + GenericArgument::Type(Type::Path(TypePath { + qself: None, + path: ident.into(), + })) + } + }; + Pair::new(value, punct) + }) + .collect(), + gt_token: Default::default(), + }) + } else { + // if no generics were defined for the struct + PathArguments::None + }, + } + }) + .clone() + } +} + +impl VisitMut for Normaliser<'_> { + fn visit_path_mut(&mut self, path: &mut Path) { + if let Some(first) = path.segments.first_mut() { + if first.ident == "Self" { + *first = self.get_new_self(); + } + syn::visit_mut::visit_path_mut(self, path) + } + } +} + /// Some attributes on the original struct are to be preserved and added to the builder struct, /// in order to avoid warnings (sometimes reported as errors) in the output. fn should_preserve_attr(attr: &Attribute) -> bool { @@ -74,22 +151,33 @@ impl Parse for DerivePropsInput { } } +impl DerivePropsInput { + /// Replaces all occurences of `Self` in the struct with the actual name of the struct. + /// Must be called before tokenising the struct. + pub fn normalise(&mut self) { + let mut normaliser = Normaliser::new(&self.props_name, &self.generics); + for field in &mut self.prop_fields { + normaliser.visit_type_mut(&mut field.ty); + if let PropAttr::PropOr(expr) | PropAttr::PropOrElse(expr) = &mut field.attr { + normaliser.visit_expr_mut(expr) + } + } + } +} + impl ToTokens for DerivePropsInput { fn to_tokens(&self, tokens: &mut proc_macro2::TokenStream) { let Self { generics, props_name, + prop_fields, + preserved_attrs, .. } = self; // The wrapper is a new struct which wraps required props in `Option` let wrapper_name = format_ident!("{}Wrapper", props_name, span = Span::mixed_site()); - let wrapper = PropsWrapper::new( - &wrapper_name, - generics, - &self.prop_fields, - &self.preserved_attrs, - ); + let wrapper = PropsWrapper::new(&wrapper_name, generics, prop_fields, preserved_attrs); tokens.extend(wrapper.into_token_stream()); // The builder will only build if all required props have been set @@ -101,7 +189,7 @@ impl ToTokens for DerivePropsInput { self, &wrapper_name, &check_all_props_name, - &self.preserved_attrs, + preserved_attrs, ); let generic_args = to_arguments(generics); tokens.extend(builder.into_token_stream()); diff --git a/packages/yew-macro/src/derive_props/wrapper.rs b/packages/yew-macro/src/derive_props/wrapper.rs index 148a8e51feb..83ad4774e2e 100644 --- a/packages/yew-macro/src/derive_props/wrapper.rs +++ b/packages/yew-macro/src/derive_props/wrapper.rs @@ -48,13 +48,13 @@ impl ToTokens for PropsWrapper<'_> { } } -impl<'a> PropsWrapper<'_> { +impl<'a> PropsWrapper<'a> { pub fn new( name: &'a Ident, generics: &'a Generics, prop_fields: &'a [PropField], extra_attrs: &'a [Attribute], - ) -> PropsWrapper<'a> { + ) -> Self { PropsWrapper { wrapper_name: name, generics, @@ -62,9 +62,7 @@ impl<'a> PropsWrapper<'_> { extra_attrs, } } -} -impl PropsWrapper<'_> { fn field_defs(&self) -> impl Iterator { self.prop_fields.iter().map(|pf| pf.to_field_def()) } diff --git a/packages/yew-macro/src/html_tree/lint/mod.rs b/packages/yew-macro/src/html_tree/lint/mod.rs index 5504be6bbf1..60e8cd15262 100644 --- a/packages/yew-macro/src/html_tree/lint/mod.rs +++ b/packages/yew-macro/src/html_tree/lint/mod.rs @@ -13,6 +13,7 @@ use crate::props::{ElementProps, Prop}; /// are only emitted on nightly. #[allow(dead_code)] pub trait Lint { + #[cfg_attr(not(yew_lints), allow(dead_code))] fn lint(element: &HtmlElement); } diff --git a/packages/yew-macro/src/lib.rs b/packages/yew-macro/src/lib.rs index 5d7216d84a0..acc0d4f8dfa 100644 --- a/packages/yew-macro/src/lib.rs +++ b/packages/yew-macro/src/lib.rs @@ -107,7 +107,8 @@ fn is_ide_completion() -> bool { #[proc_macro_derive(Properties, attributes(prop_or, prop_or_else, prop_or_default))] pub fn derive_props(input: TokenStream) -> TokenStream { - let input = parse_macro_input!(input as DerivePropsInput); + let mut input = parse_macro_input!(input as DerivePropsInput); + input.normalise(); TokenStream::from(input.into_token_stream()) } diff --git a/packages/yew-macro/src/props/element.rs b/packages/yew-macro/src/props/element.rs index 17a90e3f9db..a707af77bb8 100644 --- a/packages/yew-macro/src/props/element.rs +++ b/packages/yew-macro/src/props/element.rs @@ -61,6 +61,7 @@ static BOOLEAN_SET: Lazy> = Lazy::new(|| { "disabled", "formnovalidate", "hidden", + "inert", "ismap", "itemscope", "loop", diff --git a/packages/yew-macro/tests/classes_macro/classes-fail.stderr b/packages/yew-macro/tests/classes_macro/classes-fail.stderr index 9d30a817b18..9987bf14a13 100644 --- a/packages/yew-macro/tests/classes_macro/classes-fail.stderr +++ b/packages/yew-macro/tests/classes_macro/classes-fail.stderr @@ -17,16 +17,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied | ^^ the trait `From<{integer}>` is not implemented for `Classes` | = help: the following other types implement trait `From`: - > - >> - > - > - > >> - >> + > + >> > + >> + > + > + > and $N others - = note: required because of the requirements on the impl of `Into` for `{integer}` + = note: required for `{integer}` to implement `Into` note: required by a bound in `Classes::push` --> $WORKSPACE/packages/yew/src/html/classes.rs | @@ -40,16 +40,16 @@ error[E0277]: the trait bound `Classes: From<{float}>` is not satisfied | ^^^^ the trait `From<{float}>` is not implemented for `Classes` | = help: the following other types implement trait `From`: - > - >> - > - > - > >> - >> + > + >> > + >> + > + > + > and $N others - = note: required because of the requirements on the impl of `Into` for `{float}` + = note: required for `{float}` to implement `Into` note: required by a bound in `Classes::push` --> $WORKSPACE/packages/yew/src/html/classes.rs | @@ -60,22 +60,25 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied --> tests/classes_macro/classes-fail.rs:9:14 | 9 | classes!(vec![42]); - | ^^^ the trait `From<{integer}>` is not implemented for `Classes` + | ---^^^^^ + | | + | the trait `From<{integer}>` is not implemented for `Classes` + | required by a bound introduced by this call | = help: the following other types implement trait `From`: - > - >> - > - > - > >> - >> + > + >> > + >> + > + > + > and $N others - = note: required because of the requirements on the impl of `Into` for `{integer}` - = note: required because of the requirements on the impl of `From>` for `Classes` + = note: required for `{integer}` to implement `Into` + = note: required for `Classes` to implement `From>` = note: 1 redundant requirement hidden - = note: required because of the requirements on the impl of `Into` for `Vec<{integer}>` + = note: required for `Vec<{integer}>` to implement `Into` note: required by a bound in `Classes::push` --> $WORKSPACE/packages/yew/src/html/classes.rs | @@ -89,19 +92,19 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied | ^^^^ the trait `From<{integer}>` is not implemented for `Classes` | = help: the following other types implement trait `From`: - > - >> - > - > - > >> - >> + > + >> > + >> + > + > + > and $N others - = note: required because of the requirements on the impl of `Into` for `{integer}` - = note: required because of the requirements on the impl of `From>` for `Classes` + = note: required for `{integer}` to implement `Into` + = note: required for `Classes` to implement `From>` = note: 1 redundant requirement hidden - = note: required because of the requirements on the impl of `Into` for `Option<{integer}>` + = note: required for `Option<{integer}>` to implement `Into` note: required by a bound in `Classes::push` --> $WORKSPACE/packages/yew/src/html/classes.rs | @@ -115,19 +118,19 @@ error[E0277]: the trait bound `Classes: From` is not satisfied | ^^^^ the trait `From` is not implemented for `Classes` | = help: the following other types implement trait `From`: - > - >> - > - > - > >> - >> + > + >> > + >> + > + > + > and $N others - = note: required because of the requirements on the impl of `Into` for `u32` - = note: required because of the requirements on the impl of `From>` for `Classes` + = note: required for `u32` to implement `Into` + = note: required for `Classes` to implement `From>` = note: 1 redundant requirement hidden - = note: required because of the requirements on the impl of `Into` for `Option` + = note: required for `Option` to implement `Into` note: required by a bound in `Classes::push` --> $WORKSPACE/packages/yew/src/html/classes.rs | @@ -141,16 +144,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied | ^^ the trait `From<{integer}>` is not implemented for `Classes` | = help: the following other types implement trait `From`: - > - >> - > - > - > >> - >> + > + >> > + >> + > + > + > and $N others - = note: required because of the requirements on the impl of `Into` for `{integer}` + = note: required for `{integer}` to implement `Into` note: required by a bound in `Classes::push` --> $WORKSPACE/packages/yew/src/html/classes.rs | diff --git a/packages/yew-macro/tests/classes_macro_test.rs b/packages/yew-macro/tests/classes_macro_test.rs index e2cadf8cf39..fdf00df084c 100644 --- a/packages/yew-macro/tests/classes_macro_test.rs +++ b/packages/yew-macro/tests/classes_macro_test.rs @@ -1,5 +1,5 @@ #[allow(dead_code)] -#[rustversion::attr(stable(1.64), test)] +#[rustversion::attr(stable(1.76), test)] fn classes_macro() { let t = trybuild::TestCases::new(); t.pass("tests/classes_macro/*-pass.rs"); diff --git a/packages/yew-macro/tests/derive_props/fail.stderr b/packages/yew-macro/tests/derive_props/fail.stderr index e3d2c5461ff..b03963506ae 100644 --- a/packages/yew-macro/tests/derive_props/fail.stderr +++ b/packages/yew-macro/tests/derive_props/fail.stderr @@ -32,10 +32,12 @@ error[E0277]: the trait bound `Value: Default` is not satisfied | ^^^^^^^^^^ the trait `Default` is not implemented for `Value` | note: required by a bound in `Option::::unwrap_or_default` + --> $RUST/core/src/option.rs = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `Value` with `#[derive(Default)]` | -8 | #[derive(Default)] +8 + #[derive(Default)] +9 | struct Value; | error[E0369]: binary operation `==` cannot be applied to type `Value` @@ -47,35 +49,16 @@ error[E0369]: binary operation `==` cannot be applied to type `Value` 13 | value: Value, | ^^^^^^^^^^^^ | -note: an implementation of `PartialEq<_>` might be missing for `Value` +note: an implementation of `PartialEq` might be missing for `Value` --> tests/derive_props/fail.rs:8:5 | 8 | struct Value; - | ^^^^^^^^^^^^ must implement `PartialEq<_>` + | ^^^^^^^^^^^^ must implement `PartialEq` = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) help: consider annotating `Value` with `#[derive(PartialEq)]` | -8 | #[derive(PartialEq)] - | - -error[E0369]: binary operation `!=` cannot be applied to type `Value` - --> tests/derive_props/fail.rs:13:9 - | -9 | #[derive(Clone, Properties, PartialEq)] - | --------- in this derive macro expansion -... -13 | value: Value, - | ^^^^^^^^^^^^ - | -note: an implementation of `PartialEq<_>` might be missing for `Value` - --> tests/derive_props/fail.rs:8:5 - | -8 | struct Value; - | ^^^^^^^^^^^^ must implement `PartialEq<_>` - = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info) -help: consider annotating `Value` with `#[derive(PartialEq)]` - | -8 | #[derive(PartialEq)] +8 + #[derive(PartialEq)] +9 | struct Value; | error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied @@ -85,26 +68,29 @@ error[E0277]: the trait bound `AssertAllProps: HasProp` is | ^^^^^ the trait `HasProp` is not implemented for `AssertAllProps` | = help: the following other types implement trait `HasProp`: - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> and $N others -note: required because of the requirements on the impl of `HasAllProps` for `t3::CheckPropsAll` +note: required for `t3::CheckPropsAll` to implement `HasAllProps` --> tests/derive_props/fail.rs:29:21 | 29 | #[derive(Clone, Properties, PartialEq)] - | ^^^^^^^^^^ - = note: required because of the requirements on the impl of `AllPropsFor` for `AssertAllProps` + | ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro + = note: required for `AssertAllProps` to implement `AllPropsFor` note: required by a bound in `html::component::properties::__macro::PreBuild::::build` --> $WORKSPACE/packages/yew/src/html/component/properties.rs | + | pub fn build(self) -> B::Output + | ----- required by a bound in this associated function + | where | Token: AllPropsFor, - | ^^^^^^^^^^^^^^^^^^^ required by this bound in `html::component::properties::__macro::PreBuild::::build` + | ^^^^^^^^^^^^^^^^^^^ required by this bound in `PreBuild::::build` = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied @@ -114,54 +100,53 @@ error[E0277]: the trait bound `AssertAllProps: HasProp` is | ^^^^^ the trait `HasProp` is not implemented for `AssertAllProps` | = help: the following other types implement trait `HasProp`: - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> and $N others -note: required because of the requirements on the impl of `HasAllProps` for `t4::CheckPropsAll` +note: required for `t4::CheckPropsAll` to implement `HasAllProps` --> tests/derive_props/fail.rs:41:21 | 41 | #[derive(Clone, Properties, PartialEq)] - | ^^^^^^^^^^ - = note: required because of the requirements on the impl of `AllPropsFor` for `AssertAllProps` + | ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro + = note: required for `AssertAllProps` to implement `AllPropsFor` note: required by a bound in `html::component::properties::__macro::PreBuild::::build` --> $WORKSPACE/packages/yew/src/html/component/properties.rs | + | pub fn build(self) -> B::Output + | ----- required by a bound in this associated function + | where | Token: AllPropsFor, - | ^^^^^^^^^^^^^^^^^^^ required by this bound in `html::component::properties::__macro::PreBuild::::build` + | ^^^^^^^^^^^^^^^^^^^ required by this bound in `PreBuild::::build` = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> tests/derive_props/fail.rs:66:19 | 66 | #[prop_or(123)] - | ^^^ + | ^^^- help: try using a conversion method: `.to_string()` | | - | expected struct `String`, found integer + | expected `String`, found integer | arguments to this function are incorrect | -note: associated function defined here -help: try using a conversion method - | -66 | #[prop_or(123.to_string())] - | ++++++++++++ -66 | #[prop_or(123.to_string())] - | ++++++++++++ +note: method defined here + --> $RUST/core/src/option.rs -error[E0277]: expected a `FnOnce<()>` closure, found `{integer}` +error[E0277]: expected a `FnOnce()` closure, found `{integer}` --> tests/derive_props/fail.rs:76:24 | 76 | #[prop_or_else(123)] - | ^^^ expected an `FnOnce<()>` closure, found `{integer}` + | ^^^ expected an `FnOnce()` closure, found `{integer}` | = help: the trait `FnOnce<()>` is not implemented for `{integer}` = note: wrap the `{integer}` in a closure with no arguments: `|| { /* code */ }` note: required by a bound in `Option::::unwrap_or_else` + --> $RUST/core/src/option.rs error[E0593]: function is expected to take 0 arguments, but it takes 1 argument --> tests/derive_props/fail.rs:96:24 @@ -173,11 +158,13 @@ error[E0593]: function is expected to take 0 arguments, but it takes 1 argument | -------------------------- takes 1 argument | note: required by a bound in `Option::::unwrap_or_else` + --> $RUST/core/src/option.rs -error[E0271]: type mismatch resolving ` i32 {t10::foo} as FnOnce<()>>::Output == String` +error[E0271]: expected `foo` to be a fn item that returns `String`, but it returns `i32` --> tests/derive_props/fail.rs:110:24 | 110 | #[prop_or_else(foo)] - | ^^^ expected struct `String`, found `i32` + | ^^^ expected `String`, found `i32` | note: required by a bound in `Option::::unwrap_or_else` + --> $RUST/core/src/option.rs diff --git a/packages/yew-macro/tests/derive_props_test.rs b/packages/yew-macro/tests/derive_props_test.rs index c98e8feb953..674d9a76383 100644 --- a/packages/yew-macro/tests/derive_props_test.rs +++ b/packages/yew-macro/tests/derive_props_test.rs @@ -1,5 +1,5 @@ #[allow(dead_code)] -#[rustversion::attr(stable(1.64), test)] +#[rustversion::attr(stable(1.76), test)] fn derive_props() { let t = trybuild::TestCases::new(); t.pass("tests/derive_props/pass.rs"); diff --git a/packages/yew-macro/tests/function_attr_test.rs b/packages/yew-macro/tests/function_attr_test.rs index ed3cf9d044a..ec02d263090 100644 --- a/packages/yew-macro/tests/function_attr_test.rs +++ b/packages/yew-macro/tests/function_attr_test.rs @@ -1,5 +1,5 @@ #[allow(dead_code)] -#[rustversion::attr(stable(1.64), test)] +#[rustversion::attr(stable(1.76), test)] fn tests() { let t = trybuild::TestCases::new(); t.pass("tests/function_component_attr/*-pass.rs"); diff --git a/packages/yew-macro/tests/function_component_attr/bad-return-type-fail.stderr b/packages/yew-macro/tests/function_component_attr/bad-return-type-fail.stderr index 9b8e8a2ab5d..b5b42e19988 100644 --- a/packages/yew-macro/tests/function_component_attr/bad-return-type-fail.stderr +++ b/packages/yew-macro/tests/function_component_attr/bad-return-type-fail.stderr @@ -11,6 +11,6 @@ error[E0277]: the trait bound `u32: IntoHtmlResult` is not satisfied | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `IntoHtmlResult` is not implemented for `u32` | = help: the following other types implement trait `IntoHtmlResult`: - Result VNode + Result = note: this error originates in the attribute macro `function_component` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/packages/yew-macro/tests/function_component_attr/generic-props-fail.stderr b/packages/yew-macro/tests/function_component_attr/generic-props-fail.stderr index e60f09af641..df2912f89e0 100644 --- a/packages/yew-macro/tests/function_component_attr/generic-props-fail.stderr +++ b/packages/yew-macro/tests/function_component_attr/generic-props-fail.stderr @@ -1,11 +1,13 @@ error[E0412]: cannot find type `INVALID` in this scope --> tests/function_component_attr/generic-props-fail.rs:25:19 | -20 | fn compile_fail() { - | - help: you might be missing a type parameter: `` -... 25 | html! { /> }; | ^^^^^^^ not found in this scope + | +help: you might be missing a type parameter + | +20 | fn compile_fail() { + | +++++++++ error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied --> tests/function_component_attr/generic-props-fail.rs:22:14 @@ -14,35 +16,59 @@ error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied | ^^^^ the trait `HasProp` is not implemented for `AssertAllProps` | = help: the following other types implement trait `HasProp`: - as HasProp>> - as HasProp>> + as HasProp>> + as HasProp>> as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> as HasProp>> - as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> and $N others -note: required because of the requirements on the impl of `HasAllProps` for `CheckPropsAll` +note: required for `CheckPropsAll` to implement `HasAllProps` --> tests/function_component_attr/generic-props-fail.rs:3:17 | 3 | #[derive(Clone, Properties, PartialEq)] - | ^^^^^^^^^^ - = note: required because of the requirements on the impl of `AllPropsFor` for `AssertAllProps` + | ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro + = note: required for `AssertAllProps` to implement `AllPropsFor` note: required by a bound in `yew::html::component::properties::__macro::PreBuild::::build` --> $WORKSPACE/packages/yew/src/html/component/properties.rs | + | pub fn build(self) -> B::Output + | ----- required by a bound in this associated function + | where | Token: AllPropsFor, - | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::::build` + | ^^^^^^^^^^^^^^^^^^^ required by this bound in `PreBuild::::build` = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Comp: yew::BaseComponent` is not satisfied --> tests/function_component_attr/generic-props-fail.rs:27:14 | 27 | html! { /> }; - | ^^^^ the trait `yew::BaseComponent` is not implemented for `Comp` + | ^^^^^^^^^^^^^^^^^^^^^^^ the trait `yew::BaseComponent` is not implemented for `Comp` | = help: the trait `yew::BaseComponent` is implemented for `Comp

` + +error[E0277]: the trait bound `MissingTypeBounds: yew::Properties` is not satisfied + --> tests/function_component_attr/generic-props-fail.rs:27:14 + | +27 | html! { /> }; + | ^^^^ the trait `yew::Properties` is not implemented for `MissingTypeBounds` + | + = help: the following other types implement trait `yew::Properties`: + Props + ContextProviderProps + ChildrenProps + SuspenseProps + () +note: required by a bound in `Comp` + --> tests/function_component_attr/generic-props-fail.rs:11:8 + | +8 | #[function_component(Comp)] + | ---- required by a bound in this struct +... +11 | P: Properties + PartialEq, + | ^^^^^^^^^^ required by this bound in `Comp` = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: the function or associated item `new` exists for struct `VChild>`, but its trait bounds were not satisfied @@ -56,33 +82,25 @@ error[E0599]: the function or associated item `new` exists for struct `VChild: yew::BaseComponent` -note: the following trait must be implemented +note: the trait `yew::BaseComponent` must be implemented --> $WORKSPACE/packages/yew/src/html/component/mod.rs | | pub trait BaseComponent: Sized + 'static { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: the trait bound `MissingTypeBounds: yew::Properties` is not satisfied +error[E0277]: the trait bound `Comp: yew::BaseComponent` is not satisfied --> tests/function_component_attr/generic-props-fail.rs:27:14 | 27 | html! { /> }; - | ^^^^ the trait `yew::Properties` is not implemented for `MissingTypeBounds` + | ^^^^ the trait `yew::BaseComponent` is not implemented for `Comp` | - = help: the following other types implement trait `yew::Properties`: - () - ChildrenProps - ContextProviderProps - Props - SuspenseProps -note: required by a bound in `Comp` - --> tests/function_component_attr/generic-props-fail.rs:11:8 + = help: the trait `yew::BaseComponent` is implemented for `Comp

` +note: required by a bound in `VChild` + --> $WORKSPACE/packages/yew/src/virtual_dom/vcomp.rs | -8 | #[function_component(Comp)] - | ---- required by a bound in this -... -11 | P: Properties + PartialEq, - | ^^^^^^^^^^ required by this bound in `Comp` + | pub struct VChild { + | ^^^^^^^^^^^^^ required by this bound in `VChild` = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0107]: missing generics for struct `Comp` @@ -101,4 +119,4 @@ note: struct defined here, with 1 generic parameter: `P` help: add missing generic argument | 30 | html! { /> }; - | ~~~~~~~ + | +++ diff --git a/packages/yew-macro/tests/hook_attr_test.rs b/packages/yew-macro/tests/hook_attr_test.rs index bd0a3b28812..6298193caf1 100644 --- a/packages/yew-macro/tests/hook_attr_test.rs +++ b/packages/yew-macro/tests/hook_attr_test.rs @@ -1,5 +1,5 @@ #[allow(dead_code)] -#[rustversion::attr(stable(1.64), test)] +#[rustversion::attr(stable(1.76), test)] fn tests() { let t = trybuild::TestCases::new(); t.pass("tests/hook_attr/*-pass.rs"); diff --git a/packages/yew-macro/tests/hook_macro_test.rs b/packages/yew-macro/tests/hook_macro_test.rs index 01e81a41345..ebfaa3c053c 100644 --- a/packages/yew-macro/tests/hook_macro_test.rs +++ b/packages/yew-macro/tests/hook_macro_test.rs @@ -1,5 +1,5 @@ #[allow(dead_code)] -#[rustversion::attr(stable(1.64), test)] +#[rustversion::attr(stable(1.76), test)] fn tests() { let t = trybuild::TestCases::new(); t.pass("tests/hook_macro/*-pass.rs"); diff --git a/packages/yew-macro/tests/html_macro/block-fail.stderr b/packages/yew-macro/tests/html_macro/block-fail.stderr index e659ec66f26..a723ea94037 100644 --- a/packages/yew-macro/tests/html_macro/block-fail.stderr +++ b/packages/yew-macro/tests/html_macro/block-fail.stderr @@ -2,16 +2,18 @@ error[E0277]: `()` doesn't implement `std::fmt::Display` --> tests/html_macro/block-fail.rs:6:15 | 6 | { () } - | ^^ `()` cannot be formatted with the default formatter + | ^^ + | | + | `()` cannot be formatted with the default formatter + | required by a bound introduced by this call | = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: required because of the requirements on the impl of `ToString` for `()` - = note: required because of the requirements on the impl of `From<()>` for `VNode` - = note: required because of the requirements on the impl of `Into` for `()` + = note: required for `()` to implement `ToString` + = note: required for `VNode` to implement `From<()>` + = note: required for `()` to implement `Into` = note: 2 redundant requirements hidden - = note: required because of the requirements on the impl of `Into>` for `()` - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + = note: required for `()` to implement `Into>` error[E0277]: `()` doesn't implement `std::fmt::Display` --> tests/html_macro/block-fail.rs:15:17 @@ -21,11 +23,14 @@ error[E0277]: `()` doesn't implement `std::fmt::Display` | = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead - = note: required because of the requirements on the impl of `ToString` for `()` - = note: required because of the requirements on the impl of `From<()>` for `VNode` - = note: required because of the requirements on the impl of `Into` for `()` + = note: required for `()` to implement `ToString` + = note: required for `VNode` to implement `From<()>` + = note: required for `()` to implement `Into` note: required by a bound in `into_node_iter` --> $WORKSPACE/packages/yew/src/utils/mod.rs | + | pub fn into_node_iter(it: IT) -> impl Iterator + | -------------- required by a bound in this function +... | T: Into, | ^^^^^^^ required by this bound in `into_node_iter` diff --git a/packages/yew-macro/tests/html_macro/component-fail.stderr b/packages/yew-macro/tests/html_macro/component-fail.stderr index 440ffed4c64..051f546f2c6 100644 --- a/packages/yew-macro/tests/html_macro/component-fail.stderr +++ b/packages/yew-macro/tests/html_macro/component-fail.stderr @@ -406,7 +406,7 @@ error[E0308]: mismatched types --> tests/html_macro/component-fail.rs:53:22 | 53 | html! { }; - | ----- ^^^^^^^ expected struct `ChildProperties`, found struct `std::ops::Range` + | ----- ^^^^^^^ expected `ChildProperties`, found `Range<_>` | | | expected due to this | @@ -464,6 +464,7 @@ error[E0277]: the trait bound `(): IntoPropValue` is not satisfied | required by a bound introduced by this call | = help: the trait `IntoPropValue` is implemented for `()` + = help: for that trait implementation, expected `VNode`, found `String` note: required by a bound in `ChildPropertiesBuilder::string` --> tests/html_macro/component-fail.rs:4:17 | @@ -471,7 +472,7 @@ note: required by a bound in `ChildPropertiesBuilder::string` | ^^^^^^^^^^ required by this bound in `ChildPropertiesBuilder::string` ... 7 | pub string: String, - | ------ required by a bound in this + | ------ required by a bound in this associated function = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `{integer}: IntoPropValue` is not satisfied @@ -483,14 +484,14 @@ error[E0277]: the trait bound `{integer}: IntoPropValue` is not satisfie | required by a bound introduced by this call | = help: the following other types implement trait `IntoPropValue`: - f32 - f64 - i128 + isize + i8 i16 i32 i64 - i8 - isize + i128 + usize + u8 and $N others note: required by a bound in `ChildPropertiesBuilder::string` --> tests/html_macro/component-fail.rs:4:17 @@ -499,7 +500,7 @@ note: required by a bound in `ChildPropertiesBuilder::string` | ^^^^^^^^^^ required by this bound in `ChildPropertiesBuilder::string` ... 7 | pub string: String, - | ------ required by a bound in this + | ------ required by a bound in this associated function = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `{integer}: IntoPropValue` is not satisfied @@ -511,14 +512,14 @@ error[E0277]: the trait bound `{integer}: IntoPropValue` is not satisfie | required by a bound introduced by this call | = help: the following other types implement trait `IntoPropValue`: - f32 - f64 - i128 + isize + i8 i16 i32 i64 - i8 - isize + i128 + usize + u8 and $N others note: required by a bound in `ChildPropertiesBuilder::string` --> tests/html_macro/component-fail.rs:4:17 @@ -527,7 +528,7 @@ note: required by a bound in `ChildPropertiesBuilder::string` | ^^^^^^^^^^ required by this bound in `ChildPropertiesBuilder::string` ... 7 | pub string: String, - | ------ required by a bound in this + | ------ required by a bound in this associated function = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0609]: no field `r#ref` on type `ChildProperties` @@ -555,16 +556,8 @@ error[E0277]: the trait bound `u32: IntoPropValue` is not satisfied | | | required by a bound introduced by this call | - = help: the following other types implement trait `IntoPropValue`: - f32 - f64 - i128 - i16 - i32 - i64 - i8 - isize - and $N others + = help: the trait `IntoPropValue` is implemented for `u32` + = help: for that trait implementation, expected `VNode`, found `i32` note: required by a bound in `ChildPropertiesBuilder::int` --> tests/html_macro/component-fail.rs:4:17 | @@ -572,7 +565,7 @@ note: required by a bound in `ChildPropertiesBuilder::int` | ^^^^^^^^^^ required by this bound in `ChildPropertiesBuilder::int` ... 8 | pub int: i32, - | --- required by a bound in this + | --- required by a bound in this associated function = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied @@ -582,26 +575,29 @@ error[E0277]: the trait bound `AssertAllProps: HasProp` is not satisfied | ^^^^^ the trait `HasProp` is not implemented for `AssertAllProps` | = help: the following other types implement trait `HasProp`: - as HasProp>> + as HasProp>> + as HasProp>> as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> as HasProp<_ChildContainerProperties::children, HasChildContainerPropertieschildren>> - as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> and $N others -note: required because of the requirements on the impl of `HasAllProps` for `CheckChildPropertiesAll` +note: required for `CheckChildPropertiesAll` to implement `HasAllProps` --> tests/html_macro/component-fail.rs:4:17 | 4 | #[derive(Clone, Properties, PartialEq)] - | ^^^^^^^^^^ - = note: required because of the requirements on the impl of `AllPropsFor` for `AssertAllProps` + | ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro + = note: required for `AssertAllProps` to implement `AllPropsFor` note: required by a bound in `yew::html::component::properties::__macro::PreBuild::::build` --> $WORKSPACE/packages/yew/src/html/component/properties.rs | + | pub fn build(self) -> B::Output + | ----- required by a bound in this associated function + | where | Token: AllPropsFor, - | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::::build` + | ^^^^^^^^^^^^^^^^^^^ required by this bound in `PreBuild::::build` = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0609]: no field `children` on type `ChildProperties` @@ -610,7 +606,6 @@ error[E0609]: no field `children` on type `ChildProperties` 103 | html! { { "Not allowed" } }; | ^^^^^ unknown field | - = note: available fields are: `string`, `int` = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: no method named `children` found for struct `ChildPropertiesBuilder` in the current scope @@ -630,7 +625,6 @@ error[E0609]: no field `children` on type `ChildProperties` 110 | | ^^^^^ unknown field | - = note: available fields are: `string`, `int` = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties::children, _>` is not satisfied @@ -640,26 +634,29 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties | ^^^^^^^^^^^^^^ the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps` | = help: the following other types implement trait `HasProp`: - as HasProp>> + as HasProp>> + as HasProp>> as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> as HasProp<_ChildContainerProperties::children, HasChildContainerPropertieschildren>> - as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> and $N others -note: required because of the requirements on the impl of `HasAllProps` for `CheckChildContainerPropertiesAll` +note: required for `CheckChildContainerPropertiesAll` to implement `HasAllProps` --> tests/html_macro/component-fail.rs:24:17 | 24 | #[derive(Clone, Properties, PartialEq)] - | ^^^^^^^^^^ - = note: required because of the requirements on the impl of `AllPropsFor` for `AssertAllProps` + | ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro + = note: required for `AssertAllProps` to implement `AllPropsFor` note: required by a bound in `yew::html::component::properties::__macro::PreBuild::::build` --> $WORKSPACE/packages/yew/src/html/component/properties.rs | + | pub fn build(self) -> B::Output + | ----- required by a bound in this associated function + | where | Token: AllPropsFor, - | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::::build` + | ^^^^^^^^^^^^^^^^^^^ required by this bound in `PreBuild::::build` = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties::children, _>` is not satisfied @@ -669,33 +666,38 @@ error[E0277]: the trait bound `AssertAllProps: HasProp<_ChildContainerProperties | ^^^^^^^^^^^^^^ the trait `HasProp<_ChildContainerProperties::children, _>` is not implemented for `AssertAllProps` | = help: the following other types implement trait `HasProp`: - as HasProp>> + as HasProp>> + as HasProp>> as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> - as HasProp>> as HasProp<_ChildContainerProperties::children, HasChildContainerPropertieschildren>> - as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> + as HasProp>> and $N others -note: required because of the requirements on the impl of `HasAllProps` for `CheckChildContainerPropertiesAll` +note: required for `CheckChildContainerPropertiesAll` to implement `HasAllProps` --> tests/html_macro/component-fail.rs:24:17 | 24 | #[derive(Clone, Properties, PartialEq)] - | ^^^^^^^^^^ - = note: required because of the requirements on the impl of `AllPropsFor` for `AssertAllProps` + | ^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro + = note: required for `AssertAllProps` to implement `AllPropsFor` note: required by a bound in `yew::html::component::properties::__macro::PreBuild::::build` --> $WORKSPACE/packages/yew/src/html/component/properties.rs | + | pub fn build(self) -> B::Output + | ----- required by a bound in this associated function + | where | Token: AllPropsFor, - | ^^^^^^^^^^^^^^^^^^^ required by this bound in `yew::html::component::properties::__macro::PreBuild::::build` + | ^^^^^^^^^^^^^^^^^^^ required by this bound in `PreBuild::::build` = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `yew::virtual_dom::VText: IntoPropValue>>` is not satisfied - --> tests/html_macro/component-fail.rs:117:14 + --> tests/html_macro/component-fail.rs:117:31 | 117 | html! { { "Not allowed" } }; - | ^^^^^^^^^^^^^^ the trait `IntoPropValue>>` is not implemented for `yew::virtual_dom::VText` + | -------------- ^^^^^^^^^^^^^ the trait `IntoPropValue>>` is not implemented for `yew::virtual_dom::VText` + | | + | required by a bound introduced by this call | = help: the following other types implement trait `IntoPropValue`: >> @@ -707,8 +709,8 @@ note: required by a bound in `ChildContainerPropertiesBuilder::children` | ^^^^^^^^^^ required by this bound in `ChildContainerPropertiesBuilder::children` 25 | pub struct ChildContainerProperties { 26 | pub children: ChildrenWithProps, - | -------- required by a bound in this - = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) + | -------- required by a bound in this associated function + = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `VChild: From` is not satisfied --> tests/html_macro/component-fail.rs:118:29 @@ -716,15 +718,18 @@ error[E0277]: the trait bound `VChild: From` is not satisfied 118 | html! { <> }; | ^ the trait `From` is not implemented for `VChild` | - = note: required because of the requirements on the impl of `Into>` for `VNode` + = note: required for `VNode` to implement `Into>` error[E0277]: the trait bound `VNode: IntoPropValue>>` is not satisfied - --> tests/html_macro/component-fail.rs:119:14 + --> tests/html_macro/component-fail.rs:119:30 | 119 | html! { }; - | ^^^^^^^^^^^^^^ the trait `IntoPropValue>>` is not implemented for `VNode` + | -------------- ^^^^^ the trait `IntoPropValue>>` is not implemented for `VNode` + | | + | required by a bound introduced by this call | = help: the trait `IntoPropValue>` is implemented for `VNode` + = help: for that trait implementation, expected `VNode`, found `VChild` note: required by a bound in `ChildContainerPropertiesBuilder::children` --> tests/html_macro/component-fail.rs:24:17 | @@ -732,5 +737,5 @@ note: required by a bound in `ChildContainerPropertiesBuilder::children` | ^^^^^^^^^^ required by this bound in `ChildContainerPropertiesBuilder::children` 25 | pub struct ChildContainerProperties { 26 | pub children: ChildrenWithProps, - | -------- required by a bound in this - = note: this error originates in the macro `html` which comes from the expansion of the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) + | -------- required by a bound in this associated function + = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/packages/yew-macro/tests/html_macro/component-unimplemented-fail.stderr b/packages/yew-macro/tests/html_macro/component-unimplemented-fail.stderr index b229ced60b6..3a26724acaa 100644 --- a/packages/yew-macro/tests/html_macro/component-unimplemented-fail.stderr +++ b/packages/yew-macro/tests/html_macro/component-unimplemented-fail.stderr @@ -5,7 +5,7 @@ error[E0277]: the trait bound `Unimplemented: yew::Component` is not satisfied | ^^^^^^^^^^^^^ the trait `yew::Component` is not implemented for `Unimplemented` | = help: the trait `yew::Component` is implemented for `ContextProvider` - = note: required because of the requirements on the impl of `BaseComponent` for `Unimplemented` + = note: required for `Unimplemented` to implement `BaseComponent` = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0599]: the function or associated item `new` exists for struct `VChild`, but its trait bounds were not satisfied @@ -19,7 +19,7 @@ error[E0599]: the function or associated item `new` exists for struct `VChild $WORKSPACE/packages/yew/src/html/component/mod.rs | | pub trait BaseComponent: Sized + 'static { diff --git a/packages/yew-macro/tests/html_macro/element-fail.stderr b/packages/yew-macro/tests/html_macro/element-fail.stderr index bcc320a8975..bec8a082cfe 100644 --- a/packages/yew-macro/tests/html_macro/element-fail.stderr +++ b/packages/yew-macro/tests/html_macro/element-fail.stderr @@ -342,7 +342,16 @@ error[E0308]: mismatched types | | expected `bool`, found integer | arguments to this enum variant are incorrect | +help: the type constructed contains `{integer}` due to the type of the argument passed + --> tests/html_macro/element-fail.rs:36:5 + | +36 | html! { }; + | ^^^^^^^^^^^^^^^^^^^^^^^-^^^^^ + | | + | this argument influences the type of `{{root}}` note: tuple variant defined here + --> $RUST/core/src/option.rs + = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0308]: mismatched types --> tests/html_macro/element-fail.rs:37:29 @@ -350,12 +359,25 @@ error[E0308]: mismatched types 37 | html! { }; | ------------------------^^^^^^^^^^^------ | | | - | | expected `bool`, found enum `Option` + | | expected `bool`, found `Option` | arguments to this enum variant are incorrect | = note: expected type `bool` found enum `Option` +help: the type constructed contains `Option` due to the type of the argument passed + --> tests/html_macro/element-fail.rs:37:5 + | +37 | html! { }; + | ^^^^^^^^^^^^^^^^^^^^^^^^-----------^^^^^^ + | | + | this argument influences the type of `{{root}}` note: tuple variant defined here + --> $RUST/core/src/option.rs + = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) +help: use `Option::is_some` to test if the `Option` has a value + | +37 | html! { }; + | ++++++++++ error[E0308]: mismatched types --> tests/html_macro/element-fail.rs:38:29 @@ -376,10 +398,14 @@ error[E0308]: mismatched types --> tests/html_macro/element-fail.rs:39:30 | 39 | html! { }; - | ^^^^^^^^^^ expected `bool`, found enum `Option` + | ^^^^^^^^^^ expected `bool`, found `Option` | = note: expected type `bool` found enum `Option` +help: use `Option::is_some` to test if the `Option` has a value + | +39 | html! { }; + | ++++++++++ error[E0308]: mismatched types --> tests/html_macro/element-fail.rs:40:30 @@ -403,6 +429,7 @@ error[E0277]: the trait bound `(): IntoPropValue>` is not implemented for `()` | = help: the trait `IntoPropValue` is implemented for `()` + = help: for that trait implementation, expected `VNode`, found `Option` error[E0277]: the trait bound `(): IntoPropValue>` is not satisfied --> tests/html_macro/element-fail.rs:44:27 @@ -411,6 +438,7 @@ error[E0277]: the trait bound `(): IntoPropValue>` is not implemented for `()` | = help: the trait `IntoPropValue` is implemented for `()` + = help: for that trait implementation, expected `VNode`, found `Option` error[E0277]: the trait bound `(): IntoPropValue>` is not satisfied --> tests/html_macro/element-fail.rs:45:22 @@ -419,6 +447,7 @@ error[E0277]: the trait bound `(): IntoPropValue>` is not implemented for `()` | = help: the trait `IntoPropValue` is implemented for `()` + = help: for that trait implementation, expected `VNode`, found `Option` error[E0277]: the trait bound `NotToString: IntoPropValue>` is not satisfied --> tests/html_macro/element-fail.rs:46:28 @@ -427,64 +456,70 @@ error[E0277]: the trait bound `NotToString: IntoPropValue>` is not implemented for `NotToString` | = help: the following other types implement trait `IntoPropValue`: - <&'static [(K, V)] as IntoPropValue>> - <&'static [T] as IntoPropValue>> - <&'static str as IntoPropValue> - <&'static str as IntoPropValue>> - <&'static str as IntoPropValue>> - <&'static str as IntoPropValue> - <&'static str as IntoPropValue> - <&String as IntoPropValue> + > + > + > + > + > + > + > + > and $N others error[E0277]: the trait bound `Option: IntoPropValue>` is not satisfied --> tests/html_macro/element-fail.rs:47:23 | 47 | html! { }; - | ^^^^ the trait `IntoPropValue>` is not implemented for `Option` + | ----^^^^^^^^^^^^^ + | | + | the trait `IntoPropValue>` is not implemented for `Option` + | required by a bound introduced by this call | = help: the following other types implement trait `IntoPropValue`: - as IntoPropValue>> - as IntoPropValue>> > as IntoPropValue>> - as IntoPropValue>>> - > as IntoPropValue>> - as IntoPropValue>> > as IntoPropValue>>> as IntoPropValue> + > as IntoPropValue>> + as IntoPropValue>> + as IntoPropValue>> + as IntoPropValue>> + as IntoPropValue>>> error[E0277]: the trait bound `Option<{integer}>: IntoPropValue>` is not satisfied --> tests/html_macro/element-fail.rs:48:22 | 48 | html! { }; - | ^^^^ the trait `IntoPropValue>` is not implemented for `Option<{integer}>` + | ----^^^ + | | + | the trait `IntoPropValue>` is not implemented for `Option<{integer}>` + | required by a bound introduced by this call | = help: the following other types implement trait `IntoPropValue`: - as IntoPropValue>> - as IntoPropValue>> > as IntoPropValue>> - as IntoPropValue>>> - > as IntoPropValue>> - as IntoPropValue>> > as IntoPropValue>>> as IntoPropValue> + > as IntoPropValue>> + as IntoPropValue>> + as IntoPropValue>> + as IntoPropValue>> + as IntoPropValue>>> -error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `{integer}` +error[E0277]: expected a `Fn(MouseEvent)` closure, found `{integer}` --> tests/html_macro/element-fail.rs:51:28 | 51 | html! { }; | -----------------------^----- | | | - | | expected an `Fn<(MouseEvent,)>` closure, found `{integer}` + | | expected an `Fn(MouseEvent)` closure, found `{integer}` | required by a bound introduced by this call | = help: the trait `Fn<(MouseEvent,)>` is not implemented for `{integer}` = help: the following other types implement trait `IntoEventCallback`: - &yew::Callback - Option - Option> yew::Callback - = note: required because of the requirements on the impl of `IntoEventCallback` for `{integer}` + Option> + Option + &yew::Callback + = note: required for `{integer}` to implement `IntoEventCallback` note: required by a bound in `yew::html::onclick::Wrapper::__macro_new` --> $WORKSPACE/packages/yew/src/html/listener/events.rs | @@ -495,23 +530,26 @@ note: required by a bound in `yew::html::onclick::Wrapper::__macro_new` ... | | | ontransitionstart(TransitionEvent) | | } - | |_^ required by this bound in `yew::html::onclick::Wrapper::__macro_new` + | | ^ + | | | + | |_required by a bound in this associated function + | required by this bound in `Wrapper::__macro_new` = note: this error originates in the macro `impl_action` which comes from the expansion of the macro `impl_short` (in Nightly builds, run with -Z macro-backtrace for more info) -error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `yew::Callback` +error[E0277]: expected a `Fn(MouseEvent)` closure, found `yew::Callback` --> tests/html_macro/element-fail.rs:52:29 | 52 | html! { }; | ------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------ | | | - | | expected an `Fn<(MouseEvent,)>` closure, found `yew::Callback` + | | expected an `Fn(MouseEvent)` closure, found `yew::Callback` | required by a bound introduced by this call | = help: the trait `Fn<(MouseEvent,)>` is not implemented for `yew::Callback` = help: the following other types implement trait `IntoEventCallback`: - &yew::Callback yew::Callback - = note: required because of the requirements on the impl of `IntoEventCallback` for `yew::Callback` + &yew::Callback + = note: required for `yew::Callback` to implement `IntoEventCallback` note: required by a bound in `yew::html::onclick::Wrapper::__macro_new` --> $WORKSPACE/packages/yew/src/html/listener/events.rs | @@ -522,7 +560,10 @@ note: required by a bound in `yew::html::onclick::Wrapper::__macro_new` ... | | | ontransitionstart(TransitionEvent) | | } - | |_^ required by this bound in `yew::html::onclick::Wrapper::__macro_new` + | | ^ + | | | + | |_required by a bound in this associated function + | required by this bound in `Wrapper::__macro_new` = note: this error originates in the macro `impl_action` which comes from the expansion of the macro `impl_short` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `Option<{integer}>: IntoEventCallback` is not satisfied @@ -535,8 +576,8 @@ error[E0277]: the trait bound `Option<{integer}>: IntoEventCallback` | required by a bound introduced by this call | = help: the following other types implement trait `IntoEventCallback`: - Option Option> + Option note: required by a bound in `yew::html::onfocus::Wrapper::__macro_new` --> $WORKSPACE/packages/yew/src/html/listener/events.rs | @@ -547,49 +588,57 @@ note: required by a bound in `yew::html::onfocus::Wrapper::__macro_new` ... | | | ontransitionstart(TransitionEvent) | | } - | |_^ required by this bound in `yew::html::onfocus::Wrapper::__macro_new` + | | ^ + | | | + | |_required by a bound in this associated function + | required by this bound in `Wrapper::__macro_new` = note: this error originates in the macro `impl_action` which comes from the expansion of the macro `impl_short` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `(): IntoPropValue` is not satisfied --> tests/html_macro/element-fail.rs:56:25 | 56 | html! { }; - | ^^ the trait `IntoPropValue` is not implemented for `()` + | ^^ + | | + | the trait `IntoPropValue` is not implemented for `()` + | required by a bound introduced by this call | = help: the trait `IntoPropValue` is implemented for `()` - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: for that trait implementation, expected `VNode`, found `yew::NodeRef` error[E0277]: the trait bound `Option: IntoPropValue` is not satisfied --> tests/html_macro/element-fail.rs:57:25 | 57 | html! { }; - | ^^^^ the trait `IntoPropValue` is not implemented for `Option` + | ----^^^^^^^^^^^^^^^^^^^^ + | | + | the trait `IntoPropValue` is not implemented for `Option` + | required by a bound introduced by this call | = help: the following other types implement trait `IntoPropValue`: - as IntoPropValue>> - as IntoPropValue>> > as IntoPropValue>> - as IntoPropValue>>> - > as IntoPropValue>> - as IntoPropValue>> > as IntoPropValue>>> as IntoPropValue> - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + > as IntoPropValue>> + as IntoPropValue>> + as IntoPropValue>> + as IntoPropValue>> + as IntoPropValue>>> -error[E0277]: expected a `Fn<(MouseEvent,)>` closure, found `yew::Callback` +error[E0277]: expected a `Fn(MouseEvent)` closure, found `yew::Callback` --> tests/html_macro/element-fail.rs:58:29 | 58 | html! { }; | ------------------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------ | | | - | | expected an `Fn<(MouseEvent,)>` closure, found `yew::Callback` + | | expected an `Fn(MouseEvent)` closure, found `yew::Callback` | required by a bound introduced by this call | = help: the trait `Fn<(MouseEvent,)>` is not implemented for `yew::Callback` = help: the following other types implement trait `IntoEventCallback`: - &yew::Callback yew::Callback - = note: required because of the requirements on the impl of `IntoEventCallback` for `yew::Callback` + &yew::Callback + = note: required for `yew::Callback` to implement `IntoEventCallback` note: required by a bound in `yew::html::onclick::Wrapper::__macro_new` --> $WORKSPACE/packages/yew/src/html/listener/events.rs | @@ -600,7 +649,10 @@ note: required by a bound in `yew::html::onclick::Wrapper::__macro_new` ... | | | ontransitionstart(TransitionEvent) | | } - | |_^ required by this bound in `yew::html::onclick::Wrapper::__macro_new` + | | ^ + | | | + | |_required by a bound in this associated function + | required by this bound in `Wrapper::__macro_new` = note: this error originates in the macro `impl_action` which comes from the expansion of the macro `impl_short` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `NotToString: IntoPropValue>` is not satisfied @@ -610,24 +662,27 @@ error[E0277]: the trait bound `NotToString: IntoPropValue>` is not implemented for `NotToString` | = help: the following other types implement trait `IntoPropValue`: - <&'static [(K, V)] as IntoPropValue>> - <&'static [T] as IntoPropValue>> - <&'static str as IntoPropValue> - <&'static str as IntoPropValue>> - <&'static str as IntoPropValue>> - <&'static str as IntoPropValue> - <&'static str as IntoPropValue> - <&String as IntoPropValue> + > + > + > + > + > + > + > + > and $N others error[E0277]: the trait bound `(): IntoPropValue` is not satisfied --> tests/html_macro/element-fail.rs:62:25 | 62 | html! { }; - | ^^ the trait `IntoPropValue` is not implemented for `()` + | ^^ + | | + | the trait `IntoPropValue` is not implemented for `()` + | required by a bound introduced by this call | = help: the trait `IntoPropValue` is implemented for `()` - = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) + = help: for that trait implementation, expected `VNode`, found `yew::NodeRef` error[E0277]: the trait bound `implicit_clone::unsync::string::IString: From<{integer}>` is not satisfied --> tests/html_macro/element-fail.rs:77:16 @@ -636,9 +691,10 @@ error[E0277]: the trait bound `implicit_clone::unsync::string::IString: From<{in | ^^ the trait `From<{integer}>` is not implemented for `implicit_clone::unsync::string::IString` | = help: the following other types implement trait `From`: - > - > >> >> > - = note: required because of the requirements on the impl of `Into` for `{integer}` + >> + > + > + = note: required for `{integer}` to implement `Into` diff --git a/packages/yew-macro/tests/html_macro/generic-component-fail.stderr b/packages/yew-macro/tests/html_macro/generic-component-fail.stderr index a0071a87b44..6717522f1e8 100644 --- a/packages/yew-macro/tests/html_macro/generic-component-fail.stderr +++ b/packages/yew-macro/tests/html_macro/generic-component-fail.stderr @@ -20,7 +20,7 @@ error: mismatched closing tags: expected `Generic`, found `Generic --> tests/html_macro/generic-component-fail.rs:50:14 | 50 | html! { >> }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: expected a valid closing tag for component note: found opening tag `>` diff --git a/packages/yew-macro/tests/html_macro/iterable-fail.stderr b/packages/yew-macro/tests/html_macro/iterable-fail.stderr index 54649e26bbe..6b71efea4a1 100644 --- a/packages/yew-macro/tests/html_macro/iterable-fail.stderr +++ b/packages/yew-macro/tests/html_macro/iterable-fail.stderr @@ -11,16 +11,19 @@ error[E0277]: `()` is not an iterator | ^^ `()` is not an iterator | = help: the trait `Iterator` is not implemented for `()` - = note: required because of the requirements on the impl of `IntoIterator` for `()` + = note: required for `()` to implement `IntoIterator` error[E0277]: `()` is not an iterator --> tests/html_macro/iterable-fail.rs:6:17 | 6 | html! { for {()} }; - | ^^^^ `()` is not an iterator + | ^--^ + | || + | |this tail expression is of type `()` + | `()` is not an iterator | = help: the trait `Iterator` is not implemented for `()` - = note: required because of the requirements on the impl of `IntoIterator` for `()` + = note: required for `()` to implement `IntoIterator` error[E0277]: `()` doesn't implement `std::fmt::Display` --> tests/html_macro/iterable-fail.rs:7:17 @@ -31,11 +34,12 @@ error[E0277]: `()` doesn't implement `std::fmt::Display` = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = help: the trait `FromIterator` is implemented for `VNode` - = note: required because of the requirements on the impl of `ToString` for `()` - = note: required because of the requirements on the impl of `From<()>` for `VNode` - = note: required because of the requirements on the impl of `Into` for `()` - = note: required because of the requirements on the impl of `FromIterator<()>` for `VNode` + = note: required for `()` to implement `ToString` + = note: required for `VNode` to implement `From<()>` + = note: required for `()` to implement `Into` + = note: required for `VNode` to implement `FromIterator<()>` note: required by a bound in `collect` + --> $RUST/core/src/iter/traits/iterator.rs error[E0277]: `()` doesn't implement `std::fmt::Display` --> tests/html_macro/iterable-fail.rs:10:17 @@ -46,11 +50,12 @@ error[E0277]: `()` doesn't implement `std::fmt::Display` = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = help: the trait `FromIterator` is implemented for `VNode` - = note: required because of the requirements on the impl of `ToString` for `()` - = note: required because of the requirements on the impl of `From<()>` for `VNode` - = note: required because of the requirements on the impl of `Into` for `()` - = note: required because of the requirements on the impl of `FromIterator<()>` for `VNode` + = note: required for `()` to implement `ToString` + = note: required for `VNode` to implement `From<()>` + = note: required for `()` to implement `Into` + = note: required for `VNode` to implement `FromIterator<()>` note: required by a bound in `collect` + --> $RUST/core/src/iter/traits/iterator.rs error[E0277]: `()` doesn't implement `std::fmt::Display` --> tests/html_macro/iterable-fail.rs:13:17 @@ -61,12 +66,13 @@ error[E0277]: `()` doesn't implement `std::fmt::Display` = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = help: the trait `FromIterator` is implemented for `VNode` - = note: required because of the requirements on the impl of `std::fmt::Display` for `&()` - = note: required because of the requirements on the impl of `ToString` for `&()` - = note: required because of the requirements on the impl of `From<&()>` for `VNode` - = note: required because of the requirements on the impl of `Into` for `&()` - = note: required because of the requirements on the impl of `FromIterator<&()>` for `VNode` + = note: required for `&()` to implement `std::fmt::Display` + = note: required for `&()` to implement `ToString` + = note: required for `VNode` to implement `From<&()>` + = note: required for `&()` to implement `Into` + = note: required for `VNode` to implement `FromIterator<&()>` note: required by a bound in `collect` + --> $RUST/core/src/iter/traits/iterator.rs error[E0277]: `()` is not an iterator --> tests/html_macro/iterable-fail.rs:18:19 @@ -75,9 +81,12 @@ error[E0277]: `()` is not an iterator | ^^ `()` is not an iterator | = help: the trait `Iterator` is not implemented for `()` - = note: required because of the requirements on the impl of `IntoIterator` for `()` + = note: required for `()` to implement `IntoIterator` note: required by a bound in `into_node_iter` --> $WORKSPACE/packages/yew/src/utils/mod.rs | + | pub fn into_node_iter(it: IT) -> impl Iterator + | -------------- required by a bound in this function + | where | IT: IntoIterator, | ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `into_node_iter` diff --git a/packages/yew-macro/tests/html_macro/list-fail.stderr b/packages/yew-macro/tests/html_macro/list-fail.stderr index 6fba4bb44ba..7bed9347ec2 100644 --- a/packages/yew-macro/tests/html_macro/list-fail.stderr +++ b/packages/yew-macro/tests/html_macro/list-fail.stderr @@ -44,7 +44,7 @@ error: expected an expression following this equals sign --> tests/html_macro/list-fail.rs:18:17 | 18 | html! { }; - | ^^ + | ^ error: the property value must be either a literal or enclosed in braces. Consider adding braces around your expression.: Expr::MethodCall { attrs: [], diff --git a/packages/yew-macro/tests/html_macro/node-fail.stderr b/packages/yew-macro/tests/html_macro/node-fail.stderr index 9b5f5a70717..608f3a568c4 100644 --- a/packages/yew-macro/tests/html_macro/node-fail.stderr +++ b/packages/yew-macro/tests/html_macro/node-fail.stderr @@ -42,9 +42,9 @@ error[E0425]: cannot find value `invalid` in this scope | help: consider importing one of these items | -1 | use core::ptr::invalid; +1 + use core::ptr::invalid; | -1 | use std::ptr::invalid; +1 + use std::ptr::invalid; | error[E0277]: `()` doesn't implement `std::fmt::Display` @@ -56,17 +56,17 @@ error[E0277]: `()` doesn't implement `std::fmt::Display` = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = help: the following other types implement trait `From`: - >> - > - >> > + >> + >> > > > > > - = note: required because of the requirements on the impl of `ToString` for `()` - = note: required because of the requirements on the impl of `From<()>` for `VNode` + > + = note: required for `()` to implement `ToString` + = note: required for `VNode` to implement `From<()>` = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: `()` doesn't implement `std::fmt::Display` @@ -78,15 +78,15 @@ error[E0277]: `()` doesn't implement `std::fmt::Display` = help: the trait `std::fmt::Display` is not implemented for `()` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = help: the following other types implement trait `From`: - >> - > - >> > + >> + >> > > > > > - = note: required because of the requirements on the impl of `ToString` for `()` - = note: required because of the requirements on the impl of `From<()>` for `VNode` + > + = note: required for `()` to implement `ToString` + = note: required for `VNode` to implement `From<()>` = note: this error originates in the macro `html` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/packages/yew-macro/tests/html_macro_test.rs b/packages/yew-macro/tests/html_macro_test.rs index 4a91060b1fc..69d62934bfa 100644 --- a/packages/yew-macro/tests/html_macro_test.rs +++ b/packages/yew-macro/tests/html_macro_test.rs @@ -1,7 +1,7 @@ use yew::{html, html_nested}; #[allow(dead_code)] -#[rustversion::attr(stable(1.64), test)] +#[rustversion::attr(stable(1.76), test)] fn html_macro() { let t = trybuild::TestCases::new(); diff --git a/packages/yew-macro/tests/props_macro/props-fail.stderr b/packages/yew-macro/tests/props_macro/props-fail.stderr index ed0f4b24e1f..187f81afb57 100644 --- a/packages/yew-macro/tests/props_macro/props-fail.stderr +++ b/packages/yew-macro/tests/props_macro/props-fail.stderr @@ -14,7 +14,7 @@ error: expected ident --> tests/props_macro/props-fail.rs:13:31 | 13 | yew::props!(Props { a: 1, ..props }); - | ^^ + | ^ error[E0425]: cannot find value `does_not_exist` in this scope --> tests/props_macro/props-fail.rs:15:25 @@ -28,7 +28,7 @@ error[E0609]: no field `fail` on type `Props` 10 | yew::props!(Props { a: 5, fail: 10 }); | ^^^^ unknown field | - = note: available fields are: `a` + = note: available field is: `a` error[E0599]: no method named `fail` found for struct `PropsBuilder` in the current scope --> tests/props_macro/props-fail.rs:10:31 @@ -45,7 +45,7 @@ error[E0609]: no field `does_not_exist` on type `Props` 15 | yew::props!(Props { does_not_exist }); | ^^^^^^^^^^^^^^ unknown field | - = note: available fields are: `a` + = note: available field is: `a` error[E0599]: no method named `does_not_exist` found for struct `PropsBuilder` in the current scope --> tests/props_macro/props-fail.rs:15:25 diff --git a/packages/yew-macro/tests/props_macro/props-pass.rs b/packages/yew-macro/tests/props_macro/props-pass.rs index cdd51db77f9..4e1186d9323 100644 --- a/packages/yew-macro/tests/props_macro/props-pass.rs +++ b/packages/yew-macro/tests/props_macro/props-pass.rs @@ -56,6 +56,22 @@ pub struct RawIdentProps { r#pointless_raw_name: ::std::primitive::usize, } +#[derive(::yew::Properties)] +pub struct SelfRefProps<'a, T> { + x: ::std::boxed::Box, + y: ::std::boxed::Box, + z: &'a Self, + a: ::std::marker::PhantomData<(&'a Self, Self)>, + b: ::std::marker::PhantomData<::std::boxed::Box>, + c: fn(&Self) -> Self, +} + +impl ::std::cmp::PartialEq for SelfRefProps<'_, T> { + fn eq(&self, _: &Self) -> ::std::primitive::bool { + ::std::unimplemented!() + } +} + fn pass_raw_idents() { ::yew::props!(RawIdentProps { r#true: 5 }); let (r#true, r#pointless_raw_name) = (3, 5); diff --git a/packages/yew-macro/tests/props_macro/resolve-prop-fail.stderr b/packages/yew-macro/tests/props_macro/resolve-prop-fail.stderr index d58e437a03f..1ea3b75896e 100644 --- a/packages/yew-macro/tests/props_macro/resolve-prop-fail.stderr +++ b/packages/yew-macro/tests/props_macro/resolve-prop-fail.stderr @@ -1,17 +1,42 @@ error[E0277]: can't compare `Props` with `Props` - --> tests/props_macro/resolve-prop-fail.rs:3:17 + --> tests/props_macro/resolve-prop-fail.rs:4:8 | -3 | #[derive(Clone, Properties)] - | ^^^^^^^^^^ no implementation for `Props == Props` +4 | struct Props {} + | ^^^^^ no implementation for `Props == Props` | = help: the trait `PartialEq` is not implemented for `Props` note: required by a bound in `yew::Properties` --> $WORKSPACE/packages/yew/src/html/component/properties.rs | | pub trait Properties: PartialEq { - | ^^^^^^^^^ required by this bound in `yew::Properties` - = note: this error originates in the derive macro `Properties` (in Nightly builds, run with -Z macro-backtrace for more info) + | ^^^^^^^^^ required by this bound in `Properties` help: consider annotating `Props` with `#[derive(PartialEq)]` | -4 | #[derive(PartialEq)] +4 + #[derive(PartialEq)] +5 | struct Props {} | + +error[E0277]: can't compare `Props` with `Props` + --> tests/props_macro/resolve-prop-fail.rs:9:23 + | +9 | type Properties = Props; + | ^^^^^ no implementation for `Props == Props` + | + = help: the trait `PartialEq` is not implemented for `Props` + = help: the following other types implement trait `yew::Properties`: + Props + ContextProviderProps + ChildrenProps + SuspenseProps + () + = note: required for `::Properties` to implement `yew::Properties` +note: required by a bound in `yew::Component::Properties` + --> $WORKSPACE/packages/yew/src/html/component/mod.rs + | + | type Properties: Properties; + | ^^^^^^^^^^ required by this bound in `Component::Properties` +help: consider annotating `Props` with `#[derive(PartialEq)]` + | +4 + #[derive(PartialEq)] +5 | struct Props {} + | diff --git a/packages/yew-macro/tests/props_macro_test.rs b/packages/yew-macro/tests/props_macro_test.rs index b82adc18486..008b161d5d3 100644 --- a/packages/yew-macro/tests/props_macro_test.rs +++ b/packages/yew-macro/tests/props_macro_test.rs @@ -1,5 +1,5 @@ #[allow(dead_code)] -#[rustversion::attr(stable(1.64), test)] +#[rustversion::attr(stable(1.76), test)] fn props_macro() { let t = trybuild::TestCases::new(); t.pass("tests/props_macro/*-pass.rs"); diff --git a/packages/yew-router-macro/Cargo.toml b/packages/yew-router-macro/Cargo.toml index c612ed97215..0c30ff6928b 100644 --- a/packages/yew-router-macro/Cargo.toml +++ b/packages/yew-router-macro/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" license = "MIT OR Apache-2.0" description = "Contains macros used with yew-router" repository = "https://github.com/yewstack/yew" -rust-version = "1.64.0" +rust-version = "1.76.0" [lib] proc-macro = true diff --git a/packages/yew-router-macro/Makefile.toml b/packages/yew-router-macro/Makefile.toml index 1eae4efc7c4..c194283736b 100644 --- a/packages/yew-router-macro/Makefile.toml +++ b/packages/yew-router-macro/Makefile.toml @@ -1,6 +1,6 @@ [tasks.test] clear = true -toolchain = "1.64.0" +toolchain = "1.76.0" command = "cargo" args = ["test"] diff --git a/packages/yew-router-macro/tests/routable_derive_test.rs b/packages/yew-router-macro/tests/routable_derive_test.rs index 59dbd5e0104..e57f58fdbb6 100644 --- a/packages/yew-router-macro/tests/routable_derive_test.rs +++ b/packages/yew-router-macro/tests/routable_derive_test.rs @@ -1,5 +1,5 @@ #[allow(dead_code)] -#[rustversion::attr(stable(1.64), test)] +#[rustversion::attr(stable(1.76), test)] fn tests() { let t = trybuild::TestCases::new(); t.pass("tests/routable_derive/*-pass.rs"); diff --git a/packages/yew-router/Cargo.toml b/packages/yew-router/Cargo.toml index cdc906032e3..77f71d82fd5 100644 --- a/packages/yew-router/Cargo.toml +++ b/packages/yew-router/Cargo.toml @@ -9,7 +9,7 @@ keywords = ["web", "yew", "router"] categories = ["gui", "web-programming"] description = "A router implementation for the Yew framework" repository = "https://github.com/yewstack/yew" -rust-version = "1.64.0" +rust-version = "1.76.0" [dependencies] yew = { version = "0.21.0", path = "../yew", default-features = false } diff --git a/packages/yew/Cargo.toml b/packages/yew/Cargo.toml index cebdf545e7a..4927dd3537c 100644 --- a/packages/yew/Cargo.toml +++ b/packages/yew/Cargo.toml @@ -14,7 +14,7 @@ keywords = ["web", "webasm", "javascript"] categories = ["gui", "wasm", "web-programming"] description = "A framework for creating reliable and efficient web applications" readme = "../../README.md" -rust-version = "1.64.0" +rust-version = "1.76.0" [dependencies] console_error_panic_hook = "0.1" @@ -27,7 +27,7 @@ yew-macro = { version = "^0.21.0", path = "../yew-macro" } thiserror = "1.0" futures = { version = "0.3", default-features = false, features = ["std"] } html-escape = { version = "0.2.13", optional = true } -implicit-clone = { version = "0.4.8", features = ["map"] } +implicit-clone = { version = "0.5", features = ["map"] } base64ct = { version = "1.6.0", features = ["std"], optional = true } bincode = { version = "1.3.3", optional = true } serde = { version = "1", features = ["derive"] } @@ -40,10 +40,10 @@ wasm-bindgen-futures = "0.4" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] # We still need tokio as we have docs linked to it. -tokio = { version = "1.33", features = ["rt"] } +tokio = { version = "1.38", features = ["rt"] } [dependencies.web-sys] -version = "^0.3.64" +version = "^0.3.69" features = [ "AnimationEvent", "Document", @@ -79,7 +79,7 @@ features = [ ] [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] -tokio = { version = "1.33", features = ["full"] } +tokio = { version = "1.38", features = ["full"] } [target.'cfg(all(target_arch = "wasm32", target_os = "wasi"))'.dependencies] tokio = { version = "1.33", features = ["macros", "rt", "time"] } @@ -103,3 +103,7 @@ default = [] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "documenting"] + +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(nightly_yew)'] } + diff --git a/packages/yew/src/dom_bundle/blist.rs b/packages/yew/src/dom_bundle/blist.rs index 486823055bc..5824b8daa70 100644 --- a/packages/yew/src/dom_bundle/blist.rs +++ b/packages/yew/src/dom_bundle/blist.rs @@ -248,6 +248,7 @@ impl BList { let rights_to = rev_bundles.len() - matching_len_start; let mut spliced_middle = rev_bundles.splice(matching_len_end..rights_to, std::iter::empty()); + #[allow(clippy::mutable_key_type)] let mut spare_bundles: HashSet = HashSet::with_capacity((matching_len_end..rights_to).len()); for (idx, r) in (&mut spliced_middle).enumerate() { diff --git a/packages/yew/src/dom_bundle/btag/mod.rs b/packages/yew/src/dom_bundle/btag/mod.rs index 50b58bdc33e..4cf26aa3c42 100644 --- a/packages/yew/src/dom_bundle/btag/mod.rs +++ b/packages/yew/src/dom_bundle/btag/mod.rs @@ -985,7 +985,7 @@ mod tests { let elem_vtag = assert_vtag(next_elem); // Sync happens here - // this should remove the the "disabled" attribute + // this should remove the "disabled" attribute elem_vtag.reconcile_node(&root, &scope, &parent, DomSlot::at_end(), &mut elem); assert_eq!( diff --git a/packages/yew/src/functional/hooks/use_ref.rs b/packages/yew/src/functional/hooks/use_ref.rs index e03db8a2130..330c9be938d 100644 --- a/packages/yew/src/functional/hooks/use_ref.rs +++ b/packages/yew/src/functional/hooks/use_ref.rs @@ -4,18 +4,74 @@ use std::rc::Rc; use crate::functional::{hook, use_state, Hook, HookContext}; use crate::NodeRef; -struct UseMutRef { +struct UseRef { init_fn: F, } -impl T> Hook for UseMutRef { - type Output = Rc>; +impl T> Hook for UseRef { + type Output = Rc; fn run(self, ctx: &mut HookContext) -> Self::Output { - ctx.next_state(|_| RefCell::new((self.init_fn)())) + ctx.next_state(|_| (self.init_fn)()) } } +/// This hook is used for obtaining a reference to a stateful value. +/// Its state persists across renders. +/// +/// Mutation must be done via interior mutability, such as `Cell` or `RefCell`. +/// +/// It is important to note that you do not get notified of state changes. +/// If you need the component to be re-rendered on state change, consider using +/// [`use_state`](super::use_state()). +/// +/// # Example +/// ```rust +/// use std::cell::Cell; +/// use std::ops::{Deref, DerefMut}; +/// use std::rc::Rc; +/// +/// use web_sys::HtmlInputElement; +/// use yew::prelude::*; +/// +/// #[function_component(UseRef)] +/// fn ref_hook() -> Html { +/// let message = use_state(|| "".to_string()); +/// let message_count = use_ref(|| Cell::new(0)); +/// +/// let onclick = Callback::from(move |e| { +/// let window = gloo::utils::window(); +/// +/// if message_count.get() > 3 { +/// window.alert_with_message("Message limit reached"); +/// } else { +/// message_count.set(message_count.get() + 1); +/// window.alert_with_message("Message sent"); +/// } +/// }); +/// +/// let onchange = { +/// let message = message.clone(); +/// Callback::from(move |e: Event| { +/// let input: HtmlInputElement = e.target_unchecked_into(); +/// message.set(input.value()) +/// }) +/// }; +/// +/// html! { +///

+/// } +/// } +pub fn use_ref(init_fn: F) -> impl Hook> +where + F: FnOnce() -> T, +{ + UseRef { init_fn } +} + /// This hook is used for obtaining a mutable reference to a stateful value. /// Its state persists across renders. /// @@ -68,7 +124,9 @@ pub fn use_mut_ref(init_fn: F) -> impl Hook T, { - UseMutRef { init_fn } + UseRef { + init_fn: || RefCell::new(init_fn()), + } } /// This hook is used for obtaining a [`NodeRef`]. diff --git a/packages/yew/src/html/classes.rs b/packages/yew/src/html/classes.rs index 7c3f8705e1c..063e0e6a740 100644 --- a/packages/yew/src/html/classes.rs +++ b/packages/yew/src/html/classes.rs @@ -166,8 +166,9 @@ impl IntoIterator for &Classes { } } -impl Display for Classes { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +#[allow(clippy::to_string_trait_impl)] +impl ToString for Classes { + fn to_string(&self) -> String { let mut iter = self.set.iter().cloned(); iter.next() diff --git a/packages/yew/src/html/component/lifecycle.rs b/packages/yew/src/html/component/lifecycle.rs index 47244484309..1992f551fc5 100644 --- a/packages/yew/src/html/component/lifecycle.rs +++ b/packages/yew/src/html/component/lifecycle.rs @@ -149,16 +149,17 @@ where #[allow(dead_code)] pub(crate) trait Stateful { fn view(&self) -> HtmlResult; + #[cfg(feature = "csr")] fn rendered(&mut self, first_render: bool); fn destroy(&mut self); fn any_scope(&self) -> AnyScope; fn flush_messages(&mut self) -> bool; + #[cfg(feature = "csr")] fn props_changed(&mut self, props: Rc) -> bool; fn as_any(&self) -> &dyn Any; - fn as_any_mut(&mut self) -> &mut dyn Any; #[cfg(feature = "hydration")] fn creation_mode(&self) -> RenderMode; @@ -172,6 +173,7 @@ where self.component.view(&self.context) } + #[cfg(feature = "csr")] fn rendered(&mut self, first_render: bool) { self.component.rendered(&self.context, first_render) } @@ -200,6 +202,7 @@ where }) } + #[cfg(feature = "csr")] fn props_changed(&mut self, props: Rc) -> bool { let props = match Rc::downcast::(props) { Ok(m) => m, @@ -217,10 +220,6 @@ where fn as_any(&self) -> &dyn Any { self } - - fn as_any_mut(&mut self) -> &mut dyn Any { - self - } } pub(crate) struct ComponentState { diff --git a/packages/yew/src/html/component/marker.rs b/packages/yew/src/html/component/marker.rs index abd2d152d5e..f7d8e2c5cfa 100644 --- a/packages/yew/src/html/component/marker.rs +++ b/packages/yew/src/html/component/marker.rs @@ -5,7 +5,7 @@ use crate::html::{BaseComponent, ChildrenProps, Html}; /// A Component to represent a component that does not exist in current implementation. /// -/// During Hydration, Yew expected the Virtual DOM hierarchy to match the the layout used in +/// During Hydration, Yew expected the Virtual DOM hierarchy to match the layout used in /// server-side rendering. However, sometimes it is possible / reasonable to omit certain components /// from one side of the implementation. This component is used to represent a component as if a /// component "existed" in the place it is defined. diff --git a/packages/yew/src/scheduler.rs b/packages/yew/src/scheduler.rs index 308729233fa..4163f960d78 100644 --- a/packages/yew/src/scheduler.rs +++ b/packages/yew/src/scheduler.rs @@ -46,16 +46,6 @@ impl TopologicalQueue { } /// Take a single entry, preferring parents over children - #[rustversion::before(1.66)] - fn pop_topmost(&mut self) -> Option { - // BTreeMap::pop_first is available after 1.66. - let key = *self.inner.keys().next()?; - self.inner.remove(&key) - } - - /// Take a single entry, preferring parents over children - #[rustversion::since(1.66)] - #[allow(clippy::incompatible_msrv)] #[inline] fn pop_topmost(&mut self) -> Option { self.inner.pop_first().map(|(_, v)| v) diff --git a/packages/yew/src/server_renderer.rs b/packages/yew/src/server_renderer.rs index 2fbd13e628f..64a253d87b3 100644 --- a/packages/yew/src/server_renderer.rs +++ b/packages/yew/src/server_renderer.rs @@ -145,7 +145,6 @@ where // These implementations should be merged once https://github.com/tokio-rs/tracing/issues/2503 is resolved. /// Renders Yew Application into a string Stream - #[rustversion::since(1.70)] #[allow(clippy::let_with_type_underscore)] #[tracing::instrument( level = tracing::Level::DEBUG, @@ -157,19 +156,6 @@ where pub fn render_stream(self) -> impl Stream { self.render_stream_inner() } - - /// Renders Yew Application into a string Stream - #[rustversion::before(1.70)] - #[tracing::instrument( - level = tracing::Level::DEBUG, - name = "render_stream", - skip(self), - fields(hydratable = self.hydratable), - )] - #[inline(always)] - pub fn render_stream(self) -> impl Stream { - self.render_stream_inner() - } } /// A Yew Server-side Renderer. diff --git a/packages/yew/src/suspense/hooks.rs b/packages/yew/src/suspense/hooks.rs index b31a57663d6..3d975e346fd 100644 --- a/packages/yew/src/suspense/hooks.rs +++ b/packages/yew/src/suspense/hooks.rs @@ -94,8 +94,7 @@ where let output = use_state(|| None); // We only commit a result if it comes from the latest spawned future. Otherwise, this // might trigger pointless updates or even override newer state. - let latest_id = use_state(|| Cell::new(0u32)); - + let latest_id = use_ref(|| Cell::new(0u32)); let suspension = { let output = output.clone(); diff --git a/packages/yew/src/virtual_dom/vlist.rs b/packages/yew/src/virtual_dom/vlist.rs index c178d7fd1ff..2ea08815465 100644 --- a/packages/yew/src/virtual_dom/vlist.rs +++ b/packages/yew/src/virtual_dom/vlist.rs @@ -45,13 +45,9 @@ impl Deref for VList { match self.children { Some(ref m) => m, None => { - // This is mutable because the Vec is not Sync - static mut EMPTY: Vec = Vec::new(); - // SAFETY: The EMPTY value is always read-only - #[allow(static_mut_refs)] - unsafe { - &EMPTY - } + // This can be replaced with `const { &Vec::new() }` in Rust 1.79. + const EMPTY: &Vec = &Vec::new(); + EMPTY } } } diff --git a/tools/benchmark-core/Cargo.toml b/tools/benchmark-core/Cargo.toml index 871323c0700..7ea6ef7341f 100644 --- a/tools/benchmark-core/Cargo.toml +++ b/tools/benchmark-core/Cargo.toml @@ -10,5 +10,5 @@ name = "vnode" harness = false [dependencies] -divan = "0.1.0" +divan = "0.1.14" yew = { path = "../../packages/yew" } diff --git a/tools/benchmark-hooks/Cargo.toml b/tools/benchmark-hooks/Cargo.toml index cf5dba99bf6..ba0cadabb7c 100644 --- a/tools/benchmark-hooks/Cargo.toml +++ b/tools/benchmark-hooks/Cargo.toml @@ -9,9 +9,9 @@ crate-type = ["cdylib"] [dependencies] rand = { version = "0.8.5", features = ["small_rng"] } -getrandom = { version = "0.2.10", features = ["js"] } -wasm-bindgen = "0.2.87" -web-sys = { version = "0.3.64", features = ["Window"]} +getrandom = { version = "0.2.14", features = ["js"] } +wasm-bindgen = "0.2.92" +web-sys = { version = "0.3.69", features = ["Window"]} yew = { version = "0.21.0", features = ["csr"], path = "../../packages/yew" } [package.metadata.wasm-pack.profile.release] diff --git a/tools/benchmark-ssr/Cargo.toml b/tools/benchmark-ssr/Cargo.toml index 2acd408e829..bc0afa2258a 100644 --- a/tools/benchmark-ssr/Cargo.toml +++ b/tools/benchmark-ssr/Cargo.toml @@ -8,12 +8,12 @@ edition = "2021" [dependencies] yew = { path = "../../packages/yew", features = ["ssr"] } function_router = { path = "../../examples/function_router" } -tokio = { version = "1.35", features = ["full"] } -average = "0.14.1" -tabled = "0.14.0" -indicatif = "0.17.7" -serde = { version = "1.0.190", features = ["derive"] } -serde_json = "1.0.107" +tokio = { version = "1.38", features = ["full"] } +average = "0.15.1" +tabled = "0.15.0" +indicatif = "0.17.8" +serde = { version = "1.0.193", features = ["derive"] } +serde_json = "1.0.109" clap = { version = "4", features = ["derive"] } [target.'cfg(unix)'.dependencies] diff --git a/tools/benchmark-struct/Cargo.toml b/tools/benchmark-struct/Cargo.toml index a1db7065461..fc8475ef5b3 100644 --- a/tools/benchmark-struct/Cargo.toml +++ b/tools/benchmark-struct/Cargo.toml @@ -9,9 +9,9 @@ crate-type = ["cdylib"] [dependencies] rand = { version = "0.8.5", features = ["small_rng"] } -getrandom = { version = "0.2.10", features = ["js"] } -wasm-bindgen = "0.2.87" -web-sys = { version = "0.3.64", features = ["Window"]} +getrandom = { version = "0.2.14", features = ["js"] } +wasm-bindgen = "0.2.92" +web-sys = { version = "0.3.69", features = ["Window"]} yew = { version = "0.21.0", features = ["csr"], path = "../../packages/yew" } [package.metadata.wasm-pack.profile.release] diff --git a/tools/changelog/Cargo.toml b/tools/changelog/Cargo.toml index a5bc3bb9357..e84273ba009 100644 --- a/tools/changelog/Cargo.toml +++ b/tools/changelog/Cargo.toml @@ -9,11 +9,11 @@ edition = "2021" [dependencies] anyhow = "1" chrono = "0.4" -git2 = "0.18" +git2 = "0.19" regex = "1" -reqwest = { version = "0.11", features = ["blocking", "json"] } +reqwest = { version = "0.12", features = ["blocking", "json"] } serde = { version = "1", features = ["derive"] } -strum = { version = "0.25", features = ["derive"] } +strum = { version = "0.26", features = ["derive"] } clap = { version = "4", features = ["derive"] } semver = "1.0" once_cell = "1" diff --git a/tools/website-test/Cargo.toml b/tools/website-test/Cargo.toml index 14b1875110d..1d5f0786063 100644 --- a/tools/website-test/Cargo.toml +++ b/tools/website-test/Cargo.toml @@ -19,7 +19,7 @@ weblog = "0.3.0" yew = { path = "../../packages/yew/", features = ["ssr", "csr"] } yew-autoprops = "0.4.1" yew-router = { path = "../../packages/yew-router/" } -tokio = { version = "1.33.0", features = ["rt", "macros"] } +tokio = { version = "1.38.1", features = ["rt", "macros"] } [dev-dependencies.web-sys] version = "0.3" diff --git a/tools/website-test/src/lib.rs b/tools/website-test/src/lib.rs index 310f4203239..f814b314878 100644 --- a/tools/website-test/src/lib.rs +++ b/tools/website-test/src/lib.rs @@ -1,3 +1,4 @@ +#![allow(clippy::needless_doctest_main)] pub mod tutorial; include!(concat!(env!("OUT_DIR"), "/website_tests.rs")); diff --git a/website/docs/concepts/basic-web-technologies/web-sys.mdx b/website/docs/concepts/basic-web-technologies/web-sys.mdx index daffd9ad2b6..392eb2d5257 100644 --- a/website/docs/concepts/basic-web-technologies/web-sys.mdx +++ b/website/docs/concepts/basic-web-technologies/web-sys.mdx @@ -145,7 +145,7 @@ document.getElementById('mousemoveme').onmousemove = (e) => { ### `web-sys` example -Using `web-sys` alone the above JavaSciprt example could be implemented like this: +Using `web-sys` alone the above JavaScript example could be implemented like this: ```toml title=Cargo.toml [dependencies] diff --git a/website/docs/concepts/function-components/hooks/introduction.mdx b/website/docs/concepts/function-components/hooks/introduction.mdx index d2c1896f22c..c39a12d5f7b 100644 --- a/website/docs/concepts/function-components/hooks/introduction.mdx +++ b/website/docs/concepts/function-components/hooks/introduction.mdx @@ -29,6 +29,7 @@ Yew comes with the following predefined Hooks: - `use_state_eq` - `use_memo` - `use_callback` +- `use_ref` - `use_mut_ref` - `use_node_ref` - `use_reducer` diff --git a/website/docs/getting-started/introduction.mdx b/website/docs/getting-started/introduction.mdx index fedde6320c4..e013bdb14a0 100644 --- a/website/docs/getting-started/introduction.mdx +++ b/website/docs/getting-started/introduction.mdx @@ -11,7 +11,7 @@ bundler for Rust. To install Rust, follow the [official instructions](https://www.rust-lang.org/tools/install). :::important -The minimum supported Rust version (MSRV) for Yew is `1.64.0`. Older versions will not compile. +The minimum supported Rust version (MSRV) for Yew is `1.76.0`. Older versions will not compile. You can check your toolchain version using `rustup show` (under "active toolchain") or `rustc --version`. To update your toolchain, run `rustup update`. diff --git a/website/versioned_docs/version-0.20/concepts/agents.mdx b/website/versioned_docs/version-0.20/concepts/agents.mdx index 278875cb04d..6fb3066ee8b 100644 --- a/website/versioned_docs/version-0.20/concepts/agents.mdx +++ b/website/versioned_docs/version-0.20/concepts/agents.mdx @@ -36,7 +36,7 @@ The code can be found in the tag of the svgs. - Private - Spawn a new agent in a web worker for every new bridge. This is good for moving shared but independent behavior that communicates with the browser out of components. When - the the connected bridge is dropped, the agent will disappear. + the connected bridge is dropped, the agent will disappear. - Global \(WIP\) diff --git a/website/versioned_docs/version-0.20/more/deployment.mdx b/website/versioned_docs/version-0.20/more/deployment.mdx index 374bf4c4294..2e664c81436 100644 --- a/website/versioned_docs/version-0.20/more/deployment.mdx +++ b/website/versioned_docs/version-0.20/more/deployment.mdx @@ -22,7 +22,7 @@ An application with Yew router is built as a [Single Page Application (SPA)](htt But on a fresh load, such as when navigating to the page by entering it in the address bar or refreshing the page, all of these actions are handled by the browser itself, outside the running application. The browser makes a direct request to the server for that URL, bypassing the router. A wrongly configured server would return with status 404 - Not Found. -By returning `index.html` instead, the app loads as it normally would as if request was for `/`, until the router notices that the the route is `/show/42` and displays the appropriate contents. +By returning `index.html` instead, the app loads as it normally would as if request was for `/`, until the router notices that the route is `/show/42` and displays the appropriate contents. ### Configuring correct MIME-type for Web Assembly asset. diff --git a/website/versioned_docs/version-0.21/getting-started/introduction.mdx b/website/versioned_docs/version-0.21/getting-started/introduction.mdx index fedde6320c4..bb73d5f7583 100644 --- a/website/versioned_docs/version-0.21/getting-started/introduction.mdx +++ b/website/versioned_docs/version-0.21/getting-started/introduction.mdx @@ -11,7 +11,7 @@ bundler for Rust. To install Rust, follow the [official instructions](https://www.rust-lang.org/tools/install). :::important -The minimum supported Rust version (MSRV) for Yew is `1.64.0`. Older versions will not compile. +The minimum supported Rust version (MSRV) for Yew is `1.76.0`. Older versions will not compile. You can check your toolchain version using `rustup show` (under "active toolchain") or `rustc --version`. To update your toolchain, run `rustup update`. @@ -49,5 +49,5 @@ There are options other than Trunk that may be used for bundling Yew application ## Next steps -With your development environment setup, you can now either proceed with reading the documentation. +With your development environment set up, you can now proceed with reading the documentation. If you like to learn by getting your hands dirty, we recommend you check out our [tutorial](../tutorial).