diff --git a/.github/workflows/ci-changed-examples.yml b/.github/workflows/ci-changed-examples.yml
index fbf9f59ba4..3c14b2fa43 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-01-29
+ toolchain: nightly-2024-03-31
diff --git a/.github/workflows/ci-examples.yml b/.github/workflows/ci-examples.yml
index bced8a5cd4..ed0d936206 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-01-29
+ toolchain: nightly-2024-03-31
diff --git a/.github/workflows/ci-semver.yml b/.github/workflows/ci-semver.yml
index 567709a6d4..db04396345 100644
--- a/.github/workflows/ci-semver.yml
+++ b/.github/workflows/ci-semver.yml
@@ -9,7 +9,7 @@ jobs:
test:
needs: [get-leptos-changed]
if: needs.get-leptos-changed.outputs.leptos_changed == 'true'
- name: Run semver check (nightly-2024-01-29)
+ name: Run semver check (nightly-2024-03-31)
runs-on: ubuntu-latest
steps:
@@ -19,4 +19,4 @@ jobs:
- name: Sember Checks
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
- rust-toolchain: nightly-2024-01-29
+ rust-toolchain: nightly-2024-03-31
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8c23f30761..00434b8d0b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -40,4 +40,4 @@ jobs:
with:
directory: ${{ matrix.directory }}
cargo_make_task: "ci"
- toolchain: nightly-2024-01-29
+ toolchain: nightly-2024-03-31
diff --git a/.github/workflows/run-cargo-make-task.yml b/.github/workflows/run-cargo-make-task.yml
index b7a073fb86..6b40161967 100644
--- a/.github/workflows/run-cargo-make-task.yml
+++ b/.github/workflows/run-cargo-make-task.yml
@@ -48,6 +48,9 @@ jobs:
- name: Install wasm-bindgen
run: cargo binstall wasm-bindgen-cli --no-confirm
+ - name: Install wasm-pack
+ run: cargo binstall wasm-pack --no-confirm
+
- name: Install cargo-leptos
run: cargo binstall cargo-leptos --no-confirm
diff --git a/cargo-make/check.toml b/cargo-make/check.toml
index da8951cb26..6ce13a8229 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-01-29", "check-all-features"]
+args = ["+nightly-2024-03-31", "check-all-features"]
install_crate = "cargo-all-features"
diff --git a/cargo-make/lint.toml b/cargo-make/lint.toml
index a996462fb7..36154091ca 100644
--- a/cargo-make/lint.toml
+++ b/cargo-make/lint.toml
@@ -9,12 +9,10 @@ args = ["fmt", "--", "--check", "--config-path", "${LEPTOS_PROJECT_DIRECTORY}"]
dependencies = ["install-clippy"]
command = "cargo"
args = [
- "hack",
"clippy",
- "--all",
- "--each-feature",
- "--no-dev-deps",
+ "--all-features",
+ "--no-deps",
"--",
"-D",
- "clippy::print_stdout"
+ "clippy::print_stdout",
]
diff --git a/cargo-make/test.toml b/cargo-make/test.toml
index b0903e1e5b..356fb2f0ab 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-01-29", "test-all-features"]
+args = ["+nightly-2024-03-31", "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 825add57db..37602188ad 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-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"
[tasks.check-release]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
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 88d650aea7..14724d90e1 100644
--- a/examples/cargo-make/compile.toml
+++ b/examples/cargo-make/compile.toml
@@ -1,11 +1,11 @@
[tasks.build]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["build-all-features"]
install_crate = "cargo-all-features"
[tasks.check]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
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 30b5f4da26..3b74b619d1 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-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["check-all-features"]
install_crate = "cargo-all-features"
[tasks.check-release]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
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 055e912d2e..99fa95aaaf 100644
--- a/examples/counter/rust-toolchain.toml
+++ b/examples/counter/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/counter_url_query/rust-toolchain.toml b/examples/counter_url_query/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/counter_url_query/rust-toolchain.toml
+++ b/examples/counter_url_query/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/counter_without_macros/src/lib.rs b/examples/counter_without_macros/src/lib.rs
index ca67982a7f..6124517f8c 100644
--- a/examples/counter_without_macros/src/lib.rs
+++ b/examples/counter_without_macros/src/lib.rs
@@ -1,4 +1,4 @@
-use leptos::{ev, html::*, *};
+use leptos::{html::*, *};
/// A simple counter view.
// A component is really just a function call: it runs once to create the DOM and reactive system
diff --git a/examples/counters/rust-toolchain.toml b/examples/counters/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/counters/rust-toolchain.toml
+++ b/examples/counters/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/counters/src/lib.rs b/examples/counters/src/lib.rs
index b154be3b69..59428cc18d 100644
--- a/examples/counters/src/lib.rs
+++ b/examples/counters/src/lib.rs
@@ -1,4 +1,4 @@
-use leptos::{For, *};
+use leptos::*;
const MANY_COUNTERS: usize = 1000;
diff --git a/examples/directives/rust-toolchain.toml b/examples/directives/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/directives/rust-toolchain.toml
+++ b/examples/directives/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/error_boundary/rust-toolchain.toml b/examples/error_boundary/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/error_boundary/rust-toolchain.toml
+++ b/examples/error_boundary/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/errors_axum/rust-toolchain.toml b/examples/errors_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/errors_axum/rust-toolchain.toml
+++ b/examples/errors_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/errors_axum/src/error_template.rs b/examples/errors_axum/src/error_template.rs
index ca4239328a..9854cea6f2 100644
--- a/examples/errors_axum/src/error_template.rs
+++ b/examples/errors_axum/src/error_template.rs
@@ -1,5 +1,5 @@
use crate::errors::AppError;
-use leptos::{logging::log, Errors, *};
+use leptos::{logging::log, *};
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;
diff --git a/examples/fetch/rust-toolchain.toml b/examples/fetch/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/fetch/rust-toolchain.toml
+++ b/examples/fetch/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/hackernews/rust-toolchain.toml b/examples/hackernews/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/hackernews/rust-toolchain.toml
+++ b/examples/hackernews/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/hackernews_axum/rust-toolchain.toml b/examples/hackernews_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/hackernews_axum/rust-toolchain.toml
+++ b/examples/hackernews_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/hackernews_islands_axum/rust-toolchain.toml b/examples/hackernews_islands_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/hackernews_islands_axum/rust-toolchain.toml
+++ b/examples/hackernews_islands_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/js-framework-benchmark/Makefile.toml b/examples/js-framework-benchmark/Makefile.toml
index 44916eed44..6953f1b0bb 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-01-29"
+toolchain = "nightly-2024-03-31"
command = "cargo"
args = ["build-all-features", "--target", "wasm32-unknown-unknown"]
install_crate = "cargo-all-features"
[tasks.check]
-toolchain = "nightly-2024-01-29"
+toolchain = "nightly-2024-03-31"
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 055e912d2e..99fa95aaaf 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-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/login_with_token_csr_only/client/src/components/credentials.rs b/examples/login_with_token_csr_only/client/src/components/credentials.rs
index fcb3a81f7e..c4ffcd8f74 100644
--- a/examples/login_with_token_csr_only/client/src/components/credentials.rs
+++ b/examples/login_with_token_csr_only/client/src/components/credentials.rs
@@ -1,4 +1,4 @@
-use leptos::{ev, *};
+use leptos::*;
#[component]
pub fn CredentialsForm(
diff --git a/examples/login_with_token_csr_only/server/src/application.rs b/examples/login_with_token_csr_only/server/src/application.rs
index a410be951f..722586da21 100644
--- a/examples/login_with_token_csr_only/server/src/application.rs
+++ b/examples/login_with_token_csr_only/server/src/application.rs
@@ -16,7 +16,7 @@ impl AppState {
credentials: Credentials,
) -> Result<(), CreateUserError> {
let Credentials { email, password } = credentials;
- let user_exists = self.users.get(&email).is_some();
+ let user_exists = self.users.contains_key(&email);
if user_exists {
return Err(CreateUserError::UserExists);
}
@@ -124,6 +124,7 @@ impl EmailAddress {
#[derive(Clone)]
pub struct CurrentUser {
pub email: EmailAddress,
+ #[allow(dead_code)] // possibly a lint regression, this is used at line 65
pub token: Uuid,
}
diff --git a/examples/parent_child/rust-toolchain.toml b/examples/parent_child/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/parent_child/rust-toolchain.toml
+++ b/examples/parent_child/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/portal/rust-toolchain.toml b/examples/portal/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/portal/rust-toolchain.toml
+++ b/examples/portal/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/router/rust-toolchain.toml b/examples/router/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/router/rust-toolchain.toml
+++ b/examples/router/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/server_fns_axum/rust-toolchain.toml b/examples/server_fns_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/server_fns_axum/rust-toolchain.toml
+++ b/examples/server_fns_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/server_fns_axum/src/error_template.rs b/examples/server_fns_axum/src/error_template.rs
index 0a1731abe1..d68b2b58f7 100644
--- a/examples/server_fns_axum/src/error_template.rs
+++ b/examples/server_fns_axum/src/error_template.rs
@@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
-use leptos::{Errors, *};
+use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;
diff --git a/examples/session_auth_axum/rust-toolchain.toml b/examples/session_auth_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/session_auth_axum/rust-toolchain.toml
+++ b/examples/session_auth_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/session_auth_axum/src/error_template.rs b/examples/session_auth_axum/src/error_template.rs
index 16e81df545..d1ea5f6d03 100644
--- a/examples/session_auth_axum/src/error_template.rs
+++ b/examples/session_auth_axum/src/error_template.rs
@@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
-use leptos::{Errors, *};
+use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;
diff --git a/examples/slots/rust-toolchain.toml b/examples/slots/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/slots/rust-toolchain.toml
+++ b/examples/slots/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/sso_auth_axum/src/main.rs b/examples/sso_auth_axum/src/main.rs
index 9a017d44b2..87cdcb9fb3 100644
--- a/examples/sso_auth_axum/src/main.rs
+++ b/examples/sso_auth_axum/src/main.rs
@@ -8,12 +8,12 @@ use axum::{
Router,
};
use axum_session::{Key, SessionConfig, SessionLayer, SessionStore};
-use axum_session_auth::{AuthConfig, AuthSessionLayer, SessionSqlitePool};
+use axum_session_auth::{AuthConfig, AuthSessionLayer};
use leptos::{get_configuration, logging::log, provide_context, view};
use leptos_axum::{
generate_route_list, handle_server_fns_with_context, LeptosRoutes,
};
-use sqlx::{sqlite::SqlitePoolOptions, SqlitePool};
+use sqlx::sqlite::SqlitePoolOptions;
use sso_auth_axum::{
auth::*, fallback::file_and_error_handler, state::AppState,
};
diff --git a/examples/ssr_modes/rust-toolchain.toml b/examples/ssr_modes/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/ssr_modes/rust-toolchain.toml
+++ b/examples/ssr_modes/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/ssr_modes_axum/rust-toolchain.toml b/examples/ssr_modes_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/ssr_modes_axum/rust-toolchain.toml
+++ b/examples/ssr_modes_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/tailwind_actix/rust-toolchain.toml b/examples/tailwind_actix/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/tailwind_actix/rust-toolchain.toml
+++ b/examples/tailwind_actix/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/tailwind_axum/rust-toolchain.toml b/examples/tailwind_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/tailwind_axum/rust-toolchain.toml
+++ b/examples/tailwind_axum/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/tailwind_csr/rust-toolchain.toml b/examples/tailwind_csr/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/tailwind_csr/rust-toolchain.toml
+++ b/examples/tailwind_csr/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/timer/rust-toolchain.toml b/examples/timer/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/timer/rust-toolchain.toml
+++ b/examples/timer/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/todo_app_sqlite/rust-toolchain.toml b/examples/todo_app_sqlite/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/todo_app_sqlite/rust-toolchain.toml
+++ b/examples/todo_app_sqlite/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/todo_app_sqlite_axum/rust-toolchain.toml b/examples/todo_app_sqlite_axum/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 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 = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/todo_app_sqlite_axum/src/error_template.rs b/examples/todo_app_sqlite_axum/src/error_template.rs
index 0a1731abe1..d68b2b58f7 100644
--- a/examples/todo_app_sqlite_axum/src/error_template.rs
+++ b/examples/todo_app_sqlite_axum/src/error_template.rs
@@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
-use leptos::{Errors, *};
+use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;
diff --git a/examples/todo_app_sqlite_csr/rust-toolchain.toml b/examples/todo_app_sqlite_csr/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 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-01-29"
+channel = "nightly-2024-03-31"
diff --git a/examples/todo_app_sqlite_csr/src/error_template.rs b/examples/todo_app_sqlite_csr/src/error_template.rs
index d7f6b52619..e4e64a82f6 100644
--- a/examples/todo_app_sqlite_csr/src/error_template.rs
+++ b/examples/todo_app_sqlite_csr/src/error_template.rs
@@ -1,5 +1,5 @@
use crate::errors::TodoAppError;
-use leptos::{Errors, *};
+use leptos::*;
#[cfg(feature = "ssr")]
use leptos_axum::ResponseOptions;
diff --git a/examples/todomvc/rust-toolchain.toml b/examples/todomvc/rust-toolchain.toml
index 055e912d2e..99fa95aaaf 100644
--- a/examples/todomvc/rust-toolchain.toml
+++ b/examples/todomvc/rust-toolchain.toml
@@ -1,2 +1,2 @@
[toolchain]
-channel = "nightly-2024-01-29"
+channel = "nightly-2024-03-31"
diff --git a/leptos/Cargo.toml b/leptos/Cargo.toml
index 918764f1fe..f407058e4a 100644
--- a/leptos/Cargo.toml
+++ b/leptos/Cargo.toml
@@ -16,13 +16,18 @@ leptos_macro = { workspace = true }
leptos_reactive = { workspace = true }
leptos_server = { workspace = true }
leptos_config = { workspace = true }
-leptos-spin-macro = { version="0.1", optional = true}
+leptos-spin-macro = { version = "0.1", optional = true }
tracing = "0.1"
typed-builder = "0.18"
typed-builder-macro = "0.18"
serde = { version = "1", optional = true }
serde_json = { version = "1", optional = true }
-server_fn = { workspace = true, features = ["form-redirects", "browser", "url", "cbor"] }
+server_fn = { workspace = true, features = [
+ "form-redirects",
+ "browser",
+ "url",
+ "cbor",
+] }
web-sys = { version = "0.3.63", features = [
"ShadowRoot",
"ShadowRootInit",
@@ -68,10 +73,7 @@ miniserde = ["leptos_reactive/miniserde"]
rkyv = ["leptos_reactive/rkyv"]
tracing = ["leptos_macro/tracing"]
nonce = ["leptos_dom/nonce"]
-spin = [
- "leptos_reactive/spin",
- "leptos-spin-macro"
-]
+spin = ["leptos_reactive/spin", "leptos-spin-macro"]
experimental-islands = [
"leptos_dom/experimental-islands",
"leptos_macro/experimental-islands",
@@ -81,7 +83,7 @@ experimental-islands = [
]
trace-component-props = [
"leptos_dom/trace-component-props",
- "leptos_macro/trace-component-props"
+ "leptos_macro/trace-component-props",
]
[package.metadata.cargo-all-features]
@@ -92,9 +94,10 @@ denylist = [
"rustls",
"default-tls",
"wasm-bindgen",
+ "rkyv", # was causing clippy issues on nightly
"trace-component-props",
"spin",
- "experimental-islands"
+ "experimental-islands",
]
skip_feature_sets = [
[
diff --git a/leptos/src/error_boundary.rs b/leptos/src/error_boundary.rs
index 29a5fecb36..4c187a7087 100644
--- a/leptos/src/error_boundary.rs
+++ b/leptos/src/error_boundary.rs
@@ -1,10 +1,7 @@
use crate::Children;
use leptos_dom::{Errors, HydrationCtx, IntoView};
use leptos_macro::{component, view};
-use leptos_reactive::{
- create_rw_signal, provide_context, run_as_child, signal_prelude::*,
- RwSignal,
-};
+use leptos_reactive::{provide_context, run_as_child, signal_prelude::*};
/// When you render a `Result<_, _>` in your view, in the `Err` case it will
/// render nothing, and search up through the view tree for an ``.
diff --git a/leptos/src/show.rs b/leptos/src/show.rs
index f05a0253c3..33a4090cef 100644
--- a/leptos/src/show.rs
+++ b/leptos/src/show.rs
@@ -1,6 +1,6 @@
use leptos::{component, ChildrenFn, ViewFn};
use leptos_dom::IntoView;
-use leptos_reactive::{create_memo, signal_prelude::*};
+use leptos_reactive::signal_prelude::*;
/// A component that will show its children when the `when` condition is `true`,
/// and show the fallback when it is `false`, without rerendering every time
diff --git a/leptos_config/src/lib.rs b/leptos_config/src/lib.rs
index 77cfffeb83..dd78271c39 100644
--- a/leptos_config/src/lib.rs
+++ b/leptos_config/src/lib.rs
@@ -5,10 +5,7 @@ pub mod errors;
use crate::errors::LeptosConfigError;
use config::{Case, Config, File, FileFormat};
use regex::Regex;
-use std::{
- convert::TryFrom, env::VarError, fs, net::SocketAddr, path::Path,
- str::FromStr,
-};
+use std::{env::VarError, fs, net::SocketAddr, path::Path, str::FromStr};
use typed_builder::TypedBuilder;
/// A Struct to allow us to parse LeptosOptions from the file. Not really needed, most interactions should
diff --git a/leptos_dom/src/components/each.rs b/leptos_dom/src/components/each.rs
index 8fed794ffc..fa18c4d024 100644
--- a/leptos_dom/src/components/each.rs
+++ b/leptos_dom/src/components/each.rs
@@ -516,8 +516,10 @@ where
}
}
+#[cfg(all(target_arch = "wasm32", feature = "web"))]
struct HashRun(T);
+#[cfg(all(target_arch = "wasm32", feature = "web"))]
impl fmt::Debug for HashRun {
#[inline]
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
diff --git a/leptos_dom/src/components/errors.rs b/leptos_dom/src/components/errors.rs
index 56228d47a2..0b0159da01 100644
--- a/leptos_dom/src/components/errors.rs
+++ b/leptos_dom/src/components/errors.rs
@@ -1,6 +1,6 @@
use crate::{HydrationCtx, IntoView};
use cfg_if::cfg_if;
-use leptos_reactive::{signal_prelude::*, use_context, RwSignal};
+use leptos_reactive::{signal_prelude::*, use_context};
use server_fn::error::Error;
use std::{borrow::Cow, collections::HashMap};
diff --git a/leptos_dom/src/macro_helpers/tracing_property.rs b/leptos_dom/src/macro_helpers/tracing_property.rs
index 365cef56f2..e23f5c4f09 100644
--- a/leptos_dom/src/macro_helpers/tracing_property.rs
+++ b/leptos_dom/src/macro_helpers/tracing_property.rs
@@ -155,9 +155,8 @@ fn match_serialize() {
}
#[test]
+#[allow(clippy::needless_borrow)]
fn match_no_serialize() {
- #![allow(clippy::needless_borrow)]
-
struct CustomStruct {
field: &'static str,
}
diff --git a/leptos_dom/src/node_ref.rs b/leptos_dom/src/node_ref.rs
index 0f71b0b46a..61dbb952bf 100644
--- a/leptos_dom/src/node_ref.rs
+++ b/leptos_dom/src/node_ref.rs
@@ -1,7 +1,5 @@
use crate::{html::ElementDescriptor, HtmlElement};
-use leptos_reactive::{
- create_render_effect, create_rw_signal, signal_prelude::*, RwSignal,
-};
+use leptos_reactive::{create_render_effect, signal_prelude::*};
use std::cell::Cell;
/// Contains a shared reference to a DOM node created while using the `view`
diff --git a/leptos_dom/src/ssr.rs b/leptos_dom/src/ssr.rs
index 2de8067abc..262dac6e40 100644
--- a/leptos_dom/src/ssr.rs
+++ b/leptos_dom/src/ssr.rs
@@ -9,7 +9,7 @@ use crate::{
use cfg_if::cfg_if;
use futures::{stream::FuturesUnordered, Future, Stream, StreamExt};
use itertools::Itertools;
-use leptos_reactive::{Oco, *};
+use leptos_reactive::*;
use std::pin::Pin;
type PinnedFuture = Pin>>;
diff --git a/leptos_macro/Makefile.toml b/leptos_macro/Makefile.toml
index edc1668737..4a32f30846 100644
--- a/leptos_macro/Makefile.toml
+++ b/leptos_macro/Makefile.toml
@@ -11,13 +11,13 @@ dependencies = [
[tasks.test-leptos_macro-example]
description = "Tests the leptos_macro/example to check if macro handles doc comments correctly"
command = "cargo"
-args = ["+nightly-2024-01-29", "test", "--doc"]
+args = ["+nightly-2024-03-31", "test", "--doc"]
cwd = "example"
install_crate = false
[tasks.doc-leptos_macro-example]
description = "Docs the leptos_macro/example to check if macro handles doc comments correctly"
command = "cargo"
-args = ["+nightly-2024-01-29", "doc"]
+args = ["+nightly-2024-03-31", "doc"]
cwd = "example"
install_crate = false
diff --git a/leptos_macro/tests/ui/component.stderr b/leptos_macro/tests/ui/component.stderr
index 96c4b2e7e8..798b73c582 100644
--- a/leptos_macro/tests/ui/component.stderr
+++ b/leptos_macro/tests/ui/component.stderr
@@ -41,15 +41,19 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
error: unexpected end of input, expected `=` or `(`
= help: try `#[prop(default = 5 * 10)]`
- --> tests/ui/component.rs:36:40
+ --> tests/ui/component.rs:35:1
|
-36 | fn default_without_value(#[prop(default)] default: bool) -> impl IntoView {
- | ^
+35 | #[component]
+ | ^^^^^^^^^^^^
+ |
+ = note: this error originates in the attribute macro `component` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
= help: try `#[prop(default = 5 * 10)]`
- --> tests/ui/component.rs:42:22
+ --> tests/ui/component.rs:40:1
+ |
+40 | #[component]
+ | ^^^^^^^^^^^^
|
-42 | #[prop(default= |)] default: bool,
- | ^
+ = note: this error originates in the attribute macro `component` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/leptos_macro/tests/ui/component_absolute.stderr b/leptos_macro/tests/ui/component_absolute.stderr
index 862c28af21..3341b8e873 100644
--- a/leptos_macro/tests/ui/component_absolute.stderr
+++ b/leptos_macro/tests/ui/component_absolute.stderr
@@ -33,15 +33,19 @@ error: `optional_no_strip` conflicts with mutually exclusive `strip_option`
error: unexpected end of input, expected `=` or `(`
= help: try `#[prop(default = 5 * 10)]`
- --> tests/ui/component_absolute.rs:32:19
+ --> tests/ui/component_absolute.rs:30:1
|
-32 | #[prop(default)] default: bool,
- | ^
+30 | #[::leptos::component]
+ | ^^^^^^^^^^^^^^^^^^^^^^
+ |
+ = note: this error originates in the attribute macro `::leptos::component` (in Nightly builds, run with -Z macro-backtrace for more info)
error: unexpected end of input, expected one of: identifier, `::`, `<`, `_`, literal, `const`, `ref`, `mut`, `&`, parentheses, square brackets, `..`, `const`
= help: try `#[prop(default = 5 * 10)]`
- --> tests/ui/component_absolute.rs:39:22
+ --> tests/ui/component_absolute.rs:37:1
+ |
+37 | #[::leptos::component]
+ | ^^^^^^^^^^^^^^^^^^^^^^
|
-39 | #[prop(default= |)] default: bool,
- | ^
+ = note: this error originates in the attribute macro `::leptos::component` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/leptos_reactive/Cargo.toml b/leptos_reactive/Cargo.toml
index 0e8d8ef401..45169e934e 100644
--- a/leptos_reactive/Cargo.toml
+++ b/leptos_reactive/Cargo.toml
@@ -72,7 +72,7 @@ hydrate = [
"dep:web-sys",
]
ssr = ["dep:tokio"]
-nightly = ["rkyv?/copy"]
+nightly = [] #["rkyv?/copy"] # not working on more recent nightlys
serde = []
serde-lite = ["dep:serde-lite"]
miniserde = ["dep:miniserde"]
@@ -81,7 +81,7 @@ experimental-islands = []
spin = ["ssr", "dep:spin-sdk"]
[package.metadata.cargo-all-features]
-denylist = ["nightly"]
+denylist = ["nightly", "rkyv"]
skip_feature_sets = [
[
"csr",
diff --git a/leptos_reactive/tests/untracked.rs b/leptos_reactive/tests/untracked.rs
index 11ccc90ba4..39d02893e4 100644
--- a/leptos_reactive/tests/untracked.rs
+++ b/leptos_reactive/tests/untracked.rs
@@ -1,6 +1,5 @@
use leptos_reactive::{
- create_isomorphic_effect, create_runtime, create_signal, signal_prelude::*,
- SignalGetUntracked, SignalSetUntracked,
+ create_isomorphic_effect, create_runtime, signal_prelude::*,
};
#[test]
diff --git a/leptos_server/src/action.rs b/leptos_server/src/action.rs
index 4f3316d47a..5f91959b12 100644
--- a/leptos_server/src/action.rs
+++ b/leptos_server/src/action.rs
@@ -2,9 +2,8 @@
#[cfg(debug_assertions)]
use leptos_reactive::console_warn;
use leptos_reactive::{
- create_rw_signal, is_suppressing_resource_load, signal_prelude::*,
- spawn_local, store_value, try_batch, use_context, ReadSignal, RwSignal,
- StoredValue,
+ is_suppressing_resource_load, signal_prelude::*, spawn_local, store_value,
+ try_batch, use_context, StoredValue,
};
use server_fn::{error::ServerFnUrlError, ServerFn, ServerFnError};
use std::{cell::Cell, future::Future, pin::Pin, rc::Rc};
diff --git a/leptos_server/src/multi_action.rs b/leptos_server/src/multi_action.rs
index d1deb7e718..b9e45ffe80 100644
--- a/leptos_server/src/multi_action.rs
+++ b/leptos_server/src/multi_action.rs
@@ -1,6 +1,6 @@
use leptos_reactive::{
- create_rw_signal, is_suppressing_resource_load, signal_prelude::*,
- spawn_local, store_value, untrack, ReadSignal, RwSignal, StoredValue,
+ is_suppressing_resource_load, signal_prelude::*, spawn_local, store_value,
+ untrack, StoredValue,
};
use server_fn::{ServerFn, ServerFnError};
use std::{future::Future, pin::Pin, rc::Rc};
diff --git a/meta/src/title.rs b/meta/src/title.rs
index 3fc2ab6f76..746ecec15d 100644
--- a/meta/src/title.rs
+++ b/meta/src/title.rs
@@ -1,4 +1,4 @@
-use crate::{use_head, TextProp};
+use crate::use_head;
use cfg_if::cfg_if;
use leptos::*;
use std::{cell::RefCell, rc::Rc};
diff --git a/router/src/components/form.rs b/router/src/components/form.rs
index 96f75ba842..f34e629f49 100644
--- a/router/src/components/form.rs
+++ b/router/src/components/form.rs
@@ -470,15 +470,13 @@ where
}
});
}
- let action_url = if let Some(url) = action.url() {
- url
- } else {
+ let action_url = action.url().unwrap_or_else(|| {
debug_warn!(
" action needs a URL. Either use \
create_server_action() or Action::using_server_fn()."
);
String::new()
- };
+ });
let version = action.version();
let value = action.value();
@@ -570,15 +568,13 @@ where
}
});
}
- let action_url = if let Some(url) = action.url() {
- url
- } else {
+ let action_url = action.url().unwrap_or_else(|| {
debug_warn!(
" action needs a URL. Either use \
create_server_action() or Action::using_server_fn()."
);
String::new()
- };
+ });
let on_submit = move |ev: SubmitEvent| {
if ev.default_prevented() {
diff --git a/router/src/components/link.rs b/router/src/components/link.rs
index 08a0524be4..7b1dbb5225 100644
--- a/router/src/components/link.rs
+++ b/router/src/components/link.rs
@@ -1,5 +1,5 @@
use crate::{use_location, use_resolved_path, State};
-use leptos::{leptos_dom::IntoView, *};
+use leptos::*;
use std::borrow::Cow;
/// Describes a value that is either a static or a reactive URL, i.e.,
diff --git a/router/src/hooks.rs b/router/src/hooks.rs
index 0c53689ac5..41ceb52cf5 100644
--- a/router/src/hooks.rs
+++ b/router/src/hooks.rs
@@ -3,8 +3,7 @@ use crate::{
RouterContext,
};
use leptos::{
- create_memo, request_animation_frame, signal_prelude::*, use_context,
- window, Memo, Oco,
+ request_animation_frame, signal_prelude::*, use_context, window, Oco,
};
use std::{rc::Rc, str::FromStr};
@@ -134,9 +133,9 @@ pub fn use_params_map() -> Memo {
/// Returns the current route params, parsed into the given type, or an error.
#[track_caller]
-pub fn use_params() -> Memo>
+pub fn use_params() -> Memo>
where
- T: PartialEq,
+ T: Params + PartialEq,
{
let route = use_route();
create_memo(move |_| route.params().with(T::from_map))
@@ -150,9 +149,9 @@ pub fn use_query_map() -> Memo {
/// Returns the current URL search query, parsed into the given type, or an error.
#[track_caller]
-pub fn use_query() -> Memo>
+pub fn use_query() -> Memo>
where
- T: PartialEq,
+ T: Params + PartialEq,
{
let router = use_router();
create_memo(move |_| router.inner.location.query.with(|m| T::from_map(m)))
diff --git a/server_fn/Cargo.toml b/server_fn/Cargo.toml
index 0ac4889bee..ff7130910d 100644
--- a/server_fn/Cargo.toml
+++ b/server_fn/Cargo.toml
@@ -128,6 +128,7 @@ denylist = [
"ciborium",
"hyper",
"inventory",
+ "rkyv",
]
skip_feature_sets = [
[
diff --git a/server_fn_macro/src/lib.rs b/server_fn_macro/src/lib.rs
index 8560d555b0..b25281a224 100644
--- a/server_fn_macro/src/lib.rs
+++ b/server_fn_macro/src/lib.rs
@@ -13,7 +13,7 @@ use syn::{
parse::{Parse, ParseStream},
punctuated::Punctuated,
spanned::Spanned,
- Type, *,
+ *,
};
/// The implementation of the `server` macro.