From 98270c17cefd9a898d497a7382bfed45bf2ec07f Mon Sep 17 00:00:00 2001 From: luoxiaozero <48741584+luoxiaozero@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:18:41 +0800 Subject: [PATCH] feat: update leptos to v0.7.0-beta4 (#246) --- Cargo.toml | 6 +++--- examples/island/Cargo.toml | 8 ++++---- examples/ssr_axum/Cargo.toml | 8 ++++---- thaw/src/field/field_context_provider.rs | 2 +- thaw_utils/src/hooks/use_lock_html_scroll.rs | 4 +--- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e610acb..1b73c6f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,6 @@ thaw_components = { version = "0.2.0-beta", path = "./thaw_components" } thaw_macro = { version = "0.1.0-beta", path = "./thaw_macro" } thaw_utils = { version = "0.1.0-beta", path = "./thaw_utils" } -leptos = { version = "0.7.0-beta2" } -leptos_meta = { version = "0.7.0-beta2" } -leptos_router = { version = "0.7.0-beta2" } +leptos = { version = "0.7.0-beta4" } +leptos_meta = { version = "0.7.0-beta4" } +leptos_router = { version = "0.7.0-beta4" } diff --git a/examples/island/Cargo.toml b/examples/island/Cargo.toml index df8289f..fcb3730 100644 --- a/examples/island/Cargo.toml +++ b/examples/island/Cargo.toml @@ -9,10 +9,10 @@ crate-type = ["cdylib", "rlib"] [dependencies] axum = { version = "0.7", optional = true } console_error_panic_hook = "0.1" -leptos = { version = "0.7.0-beta2", features = ["experimental-islands"] } -leptos_axum = { version = "0.7.0-beta2", optional = true } -leptos_meta = { version = "0.7.0-beta2" } -leptos_router = { version = "0.7.0-beta2" } +leptos = { version = "0.7.0-beta4", features = ["experimental-islands"] } +leptos_axum = { version = "0.7.0-beta4", optional = true } +leptos_meta = { version = "0.7.0-beta4" } +leptos_router = { version = "0.7.0-beta4" } tokio = { version = "1", features = ["rt-multi-thread"], optional = true } tower = { version = "0.4", optional = true } tower-http = { version = "0.5", features = ["fs"], optional = true } diff --git a/examples/ssr_axum/Cargo.toml b/examples/ssr_axum/Cargo.toml index 9df2eee..b7bca43 100644 --- a/examples/ssr_axum/Cargo.toml +++ b/examples/ssr_axum/Cargo.toml @@ -9,10 +9,10 @@ crate-type = ["cdylib", "rlib"] [dependencies] axum = { version = "0.7.5", optional = true } console_error_panic_hook = "0.1" -leptos = { version = "0.7.0-beta2" } -leptos_axum = { version = "0.7.0-beta2", optional = true } -leptos_meta = { version = "0.7.0-beta2" } -leptos_router = { version = "0.7.0-beta2" } +leptos = { version = "0.7.0-beta4" } +leptos_axum = { version = "0.7.0-beta4", optional = true } +leptos_meta = { version = "0.7.0-beta4" } +leptos_router = { version = "0.7.0-beta4" } tokio = { version = "1", features = ["rt-multi-thread"], optional = true } tower = { version = "0.5.0", optional = true } tower-http = { version = "0.5", features = ["fs"], optional = true } diff --git a/thaw/src/field/field_context_provider.rs b/thaw/src/field/field_context_provider.rs index fef149d..2375c7e 100644 --- a/thaw/src/field/field_context_provider.rs +++ b/thaw/src/field/field_context_provider.rs @@ -30,7 +30,7 @@ impl FieldContextInjection { validate: impl Fn() -> bool + Send + Sync + 'static, ) { let mut key = None; - let validate = Callback::from(move |_| validate()); + let validate: Callback<(), bool> = Callback::from(move || validate()); self.0.update_value(|map| { key = Some(map.insert((name, validate))); () diff --git a/thaw_utils/src/hooks/use_lock_html_scroll.rs b/thaw_utils/src/hooks/use_lock_html_scroll.rs index cf4e2cf..c70a5a2 100644 --- a/thaw_utils/src/hooks/use_lock_html_scroll.rs +++ b/thaw_utils/src/hooks/use_lock_html_scroll.rs @@ -3,9 +3,7 @@ use leptos::reactive_graph::wrappers::read::MaybeSignal; pub fn use_lock_html_scroll(is_lock: MaybeSignal) { #[cfg(any(feature = "csr", feature = "hydrate"))] { - use leptos::prelude::{ - document, effect::RenderEffect, on_cleanup, traits::Get, StoredValue, - }; + use leptos::prelude::{document, on_cleanup, Get, RenderEffect, StoredValue}; use send_wrapper::SendWrapper; let style_el = StoredValue::new(SendWrapper::new(None::));