From ab1c4ca7a6f9087af854347dd99fe58d57e383b5 Mon Sep 17 00:00:00 2001 From: Greg Johnston Date: Fri, 5 Apr 2024 16:09:23 -0400 Subject: [PATCH] chore(ci): run all examples under stable and fix remaining linting issue (#2503) --- .github/workflows/ci-changed-examples.yml | 2 +- .github/workflows/ci-examples.yml | 2 +- cargo-make/check.toml | 2 +- cargo-make/test.toml | 2 +- examples/cargo-make/cargo-leptos.toml | 4 ++-- examples/cargo-make/compile.toml | 4 ++-- examples/cargo-make/deno-build.toml | 4 ++-- examples/counter/rust-toolchain.toml | 2 +- examples/counter_url_query/rust-toolchain.toml | 2 +- examples/counters/rust-toolchain.toml | 2 +- examples/directives/rust-toolchain.toml | 2 +- examples/error_boundary/rust-toolchain.toml | 2 +- examples/errors_axum/rust-toolchain.toml | 2 +- examples/fetch/rust-toolchain.toml | 2 +- examples/hackernews/rust-toolchain.toml | 2 +- examples/hackernews_axum/rust-toolchain.toml | 2 +- examples/hackernews_islands_axum/rust-toolchain.toml | 2 +- examples/js-framework-benchmark/Makefile.toml | 4 ++-- examples/js-framework-benchmark/rust-toolchain.toml | 2 +- examples/parent_child/rust-toolchain.toml | 2 +- examples/portal/rust-toolchain.toml | 2 +- examples/portal/tests/web.rs | 10 ++++------ examples/router/rust-toolchain.toml | 2 +- examples/server_fns_axum/rust-toolchain.toml | 2 +- examples/session_auth_axum/rust-toolchain.toml | 2 +- examples/slots/rust-toolchain.toml | 2 +- examples/ssr_modes/rust-toolchain.toml | 2 +- examples/ssr_modes/src/app.rs | 6 +++--- examples/ssr_modes_axum/rust-toolchain.toml | 2 +- examples/ssr_modes_axum/src/app.rs | 6 +++--- examples/tailwind_actix/rust-toolchain.toml | 2 +- examples/tailwind_axum/rust-toolchain.toml | 2 +- examples/tailwind_csr/rust-toolchain.toml | 2 +- examples/timer/rust-toolchain.toml | 2 +- examples/todo_app_sqlite/rust-toolchain.toml | 2 +- examples/todo_app_sqlite_axum/rust-toolchain.toml | 2 +- examples/todo_app_sqlite_csr/rust-toolchain.toml | 2 +- examples/todomvc/rust-toolchain.toml | 2 +- 38 files changed, 49 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ci-changed-examples.yml b/.github/workflows/ci-changed-examples.yml index 3c14b2fa4..474963d8d 100644 --- a/.github/workflows/ci-changed-examples.yml +++ b/.github/workflows/ci-changed-examples.yml @@ -29,4 +29,4 @@ jobs: with: directory: ${{ matrix.directory }} cargo_make_task: "ci" - toolchain: nightly-2024-03-31 + toolchain: stable diff --git a/.github/workflows/ci-examples.yml b/.github/workflows/ci-examples.yml index ed0d93620..c451ffb3e 100644 --- a/.github/workflows/ci-examples.yml +++ b/.github/workflows/ci-examples.yml @@ -24,4 +24,4 @@ jobs: with: directory: ${{ matrix.directory }} cargo_make_task: "ci" - toolchain: nightly-2024-03-31 + toolchain: stable diff --git a/cargo-make/check.toml b/cargo-make/check.toml index 6ce13a822..769e783f2 100644 --- a/cargo-make/check.toml +++ b/cargo-make/check.toml @@ -3,5 +3,5 @@ alias = "check-all" [tasks.check-all] command = "cargo" -args = ["+nightly-2024-03-31", "check-all-features"] +args = ["check-all-features"] install_crate = "cargo-all-features" diff --git a/cargo-make/test.toml b/cargo-make/test.toml index 356fb2f0a..e464d641d 100644 --- a/cargo-make/test.toml +++ b/cargo-make/test.toml @@ -3,5 +3,5 @@ alias = "test-all" [tasks.test-all] command = "cargo" -args = ["+nightly-2024-03-31", "test-all-features"] +args = ["test-all-features"] install_crate = "cargo-all-features" diff --git a/examples/cargo-make/cargo-leptos.toml b/examples/cargo-make/cargo-leptos.toml index 37602188a..ef62faac0 100644 --- a/examples/cargo-make/cargo-leptos.toml +++ b/examples/cargo-make/cargo-leptos.toml @@ -15,13 +15,13 @@ clear = true dependencies = ["check-debug", "check-release"] [tasks.check-debug] -toolchain = "nightly-2024-03-31" +toolchain = "stable" command = "cargo" args = ["check-all-features"] install_crate = "cargo-all-features" [tasks.check-release] -toolchain = "nightly-2024-03-31" +toolchain = "stable" command = "cargo" args = ["check-all-features", "--release"] install_crate = "cargo-all-features" diff --git a/examples/cargo-make/compile.toml b/examples/cargo-make/compile.toml index 14724d90e..d3763362b 100644 --- a/examples/cargo-make/compile.toml +++ b/examples/cargo-make/compile.toml @@ -1,11 +1,11 @@ [tasks.build] -toolchain = "nightly-2024-03-31" +toolchain = "stable" command = "cargo" args = ["build-all-features"] install_crate = "cargo-all-features" [tasks.check] -toolchain = "nightly-2024-03-31" +toolchain = "stable" command = "cargo" args = ["check-all-features"] install_crate = "cargo-all-features" diff --git a/examples/cargo-make/deno-build.toml b/examples/cargo-make/deno-build.toml index 3b74b619d..20eaf7520 100644 --- a/examples/cargo-make/deno-build.toml +++ b/examples/cargo-make/deno-build.toml @@ -12,13 +12,13 @@ clear = true dependencies = ["check-debug", "check-release"] [tasks.check-debug] -toolchain = "nightly-2024-03-31" +toolchain = "stable" command = "cargo" args = ["check-all-features"] install_crate = "cargo-all-features" [tasks.check-release] -toolchain = "nightly-2024-03-31" +toolchain = "stable" command = "cargo" args = ["check-all-features", "--release"] install_crate = "cargo-all-features" diff --git a/examples/counter/rust-toolchain.toml b/examples/counter/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/counter/rust-toolchain.toml +++ b/examples/counter/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/counter_url_query/rust-toolchain.toml b/examples/counter_url_query/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/counter_url_query/rust-toolchain.toml +++ b/examples/counter_url_query/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/counters/rust-toolchain.toml b/examples/counters/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/counters/rust-toolchain.toml +++ b/examples/counters/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/directives/rust-toolchain.toml b/examples/directives/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/directives/rust-toolchain.toml +++ b/examples/directives/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/error_boundary/rust-toolchain.toml b/examples/error_boundary/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/error_boundary/rust-toolchain.toml +++ b/examples/error_boundary/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/errors_axum/rust-toolchain.toml b/examples/errors_axum/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/errors_axum/rust-toolchain.toml +++ b/examples/errors_axum/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/fetch/rust-toolchain.toml b/examples/fetch/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/fetch/rust-toolchain.toml +++ b/examples/fetch/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/hackernews/rust-toolchain.toml b/examples/hackernews/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/hackernews/rust-toolchain.toml +++ b/examples/hackernews/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/hackernews_axum/rust-toolchain.toml b/examples/hackernews_axum/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/hackernews_axum/rust-toolchain.toml +++ b/examples/hackernews_axum/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/hackernews_islands_axum/rust-toolchain.toml b/examples/hackernews_islands_axum/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/hackernews_islands_axum/rust-toolchain.toml +++ b/examples/hackernews_islands_axum/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/js-framework-benchmark/Makefile.toml b/examples/js-framework-benchmark/Makefile.toml index 6953f1b0b..e64c03229 100644 --- a/examples/js-framework-benchmark/Makefile.toml +++ b/examples/js-framework-benchmark/Makefile.toml @@ -5,13 +5,13 @@ extend = [ ] [tasks.build] -toolchain = "nightly-2024-03-31" +toolchain = "stable" command = "cargo" args = ["build-all-features", "--target", "wasm32-unknown-unknown"] install_crate = "cargo-all-features" [tasks.check] -toolchain = "nightly-2024-03-31" +toolchain = "stable" command = "cargo" args = ["check-all-features", "--target", "wasm32-unknown-unknown"] install_crate = "cargo-all-features" diff --git a/examples/js-framework-benchmark/rust-toolchain.toml b/examples/js-framework-benchmark/rust-toolchain.toml index 99fa95aaa..ff2a4ff10 100644 --- a/examples/js-framework-benchmark/rust-toolchain.toml +++ b/examples/js-framework-benchmark/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-03-31" +channel = "stable" # test change diff --git a/examples/parent_child/rust-toolchain.toml b/examples/parent_child/rust-toolchain.toml index 99fa95aaa..ff2a4ff10 100644 --- a/examples/parent_child/rust-toolchain.toml +++ b/examples/parent_child/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-03-31" +channel = "stable" # test change diff --git a/examples/portal/rust-toolchain.toml b/examples/portal/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/portal/rust-toolchain.toml +++ b/examples/portal/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/portal/tests/web.rs b/examples/portal/tests/web.rs index d22db9ea7..57980c1f8 100644 --- a/examples/portal/tests/web.rs +++ b/examples/portal/tests/web.rs @@ -33,7 +33,7 @@ async fn portal() { // check HTML assert_eq!( div.inner_html(), - "
Show

This is in the body element

Hidden
" + "
Show

This is in the body element

Hidden
" ); let toggle_button = document @@ -45,8 +45,8 @@ async fn portal() { assert_eq!( div.inner_html(), - "
Show

This is in the body element

\n Visible\n
" - ); + "
Show

This is in the body element

Visible
" + ); let hide_button = document .get_element_by_id("btn-hide") @@ -57,8 +57,6 @@ async fn portal() { assert_eq!( div.inner_html(), - "
" + "
" ); } diff --git a/examples/router/rust-toolchain.toml b/examples/router/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/router/rust-toolchain.toml +++ b/examples/router/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/server_fns_axum/rust-toolchain.toml b/examples/server_fns_axum/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/server_fns_axum/rust-toolchain.toml +++ b/examples/server_fns_axum/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/session_auth_axum/rust-toolchain.toml b/examples/session_auth_axum/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/session_auth_axum/rust-toolchain.toml +++ b/examples/session_auth_axum/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/slots/rust-toolchain.toml b/examples/slots/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/slots/rust-toolchain.toml +++ b/examples/slots/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/ssr_modes/rust-toolchain.toml b/examples/ssr_modes/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/ssr_modes/rust-toolchain.toml +++ b/examples/ssr_modes/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/ssr_modes/src/app.rs b/examples/ssr_modes/src/app.rs index 437770721..676721c0a 100644 --- a/examples/ssr_modes/src/app.rs +++ b/examples/ssr_modes/src/app.rs @@ -96,8 +96,8 @@ fn Post() -> impl IntoView { }; let post_view = move || { - post().and_then(|post| { - Ok(view! { + post().map(|post| { + view! { // render content

{&post.title}

{&post.content}

@@ -107,7 +107,7 @@ fn Post() -> impl IntoView { // when it's first served <Meta name="description" content=post.content.clone()/> - }) + } }) }; diff --git a/examples/ssr_modes_axum/rust-toolchain.toml b/examples/ssr_modes_axum/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/ssr_modes_axum/rust-toolchain.toml +++ b/examples/ssr_modes_axum/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/ssr_modes_axum/src/app.rs b/examples/ssr_modes_axum/src/app.rs index 906c3677e..0af88cc14 100644 --- a/examples/ssr_modes_axum/src/app.rs +++ b/examples/ssr_modes_axum/src/app.rs @@ -96,8 +96,8 @@ fn Post() -> impl IntoView { }; let post_view = move || { - post().and_then(|post| { - Ok(view! { + post().map(|post| { + view! { // render content <h1>{&post.title}</h1> <p>{&post.content}</p> @@ -107,7 +107,7 @@ fn Post() -> impl IntoView { // when it's first served <Title text=post.title.clone()/> <Meta name="description" content=post.content.clone()/> - }) + } }) }; diff --git a/examples/tailwind_actix/rust-toolchain.toml b/examples/tailwind_actix/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/tailwind_actix/rust-toolchain.toml +++ b/examples/tailwind_actix/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/tailwind_axum/rust-toolchain.toml b/examples/tailwind_axum/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/tailwind_axum/rust-toolchain.toml +++ b/examples/tailwind_axum/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/tailwind_csr/rust-toolchain.toml b/examples/tailwind_csr/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/tailwind_csr/rust-toolchain.toml +++ b/examples/tailwind_csr/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/timer/rust-toolchain.toml b/examples/timer/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/timer/rust-toolchain.toml +++ b/examples/timer/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/todo_app_sqlite/rust-toolchain.toml b/examples/todo_app_sqlite/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/todo_app_sqlite/rust-toolchain.toml +++ b/examples/todo_app_sqlite/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/todo_app_sqlite_axum/rust-toolchain.toml b/examples/todo_app_sqlite_axum/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/todo_app_sqlite_axum/rust-toolchain.toml +++ b/examples/todo_app_sqlite_axum/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change diff --git a/examples/todo_app_sqlite_csr/rust-toolchain.toml b/examples/todo_app_sqlite_csr/rust-toolchain.toml index 99fa95aaa..ff2a4ff10 100644 --- a/examples/todo_app_sqlite_csr/rust-toolchain.toml +++ b/examples/todo_app_sqlite_csr/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "nightly-2024-03-31" +channel = "stable" # test change diff --git a/examples/todomvc/rust-toolchain.toml b/examples/todomvc/rust-toolchain.toml index 292fe499e..ff2a4ff10 100644 --- a/examples/todomvc/rust-toolchain.toml +++ b/examples/todomvc/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "stable" +channel = "stable" # test change