From 171bc334ffc15e623b05c75db1ed5c5089f0d145 Mon Sep 17 00:00:00 2001 From: BakerNet Date: Tue, 8 Oct 2024 21:56:25 -0700 Subject: [PATCH] Fix tests --- src/use_cookie.rs | 2 ++ src/use_event_source.rs | 4 +--- src/use_infinite_scroll.rs | 3 +-- src/use_prefers_reduced_motion.rs | 1 + src/use_timeout_fn.rs | 4 +--- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/use_cookie.rs b/src/use_cookie.rs index 1a5bac6..2da9323 100644 --- a/src/use_cookie.rs +++ b/src/use_cookie.rs @@ -126,6 +126,8 @@ use std::sync::Arc; /// { /// Some("Somehow get the value of the cookie header as a string".to_owned()) /// } +/// #[cfg(not(feature = "ssr"))] +/// None /// }) /// .ssr_set_cookie(|cookie: &Cookie| { /// #[cfg(feature = "ssr")] diff --git a/src/use_event_source.rs b/src/use_event_source.rs index e0820b5..e5cac1a 100644 --- a/src/use_event_source.rs +++ b/src/use_event_source.rs @@ -234,9 +234,7 @@ where ); } else { #[cfg(debug_assertions)] - let _z = - leptos::reactive::diagnostics::SpecialNonReactiveZone::enter( - ); + let _z = leptos::reactive::diagnostics::SpecialNonReactiveZone::enter(); on_failed(); } diff --git a/src/use_infinite_scroll.rs b/src/use_infinite_scroll.rs index dc2fa8c..c655097 100644 --- a/src/use_infinite_scroll.rs +++ b/src/use_infinite_scroll.rs @@ -156,8 +156,7 @@ where let measure = measure.clone(); leptos::task::spawn_local(async move { #[cfg(debug_assertions)] - let zone = - leptos::reactive::diagnostics::SpecialNonReactiveZone::enter(); + let zone = leptos::reactive::diagnostics::SpecialNonReactiveZone::enter(); join!( on_load_more.with_value(|f| f(state)), diff --git a/src/use_prefers_reduced_motion.rs b/src/use_prefers_reduced_motion.rs index 634a8e9..427185d 100644 --- a/src/use_prefers_reduced_motion.rs +++ b/src/use_prefers_reduced_motion.rs @@ -14,6 +14,7 @@ use std::sync::Arc; /// ``` /// # use leptos::prelude::*; /// # use leptos_use::use_prefers_reduced_motion; +/// # #[cfg(feature = "docs")] /// # use leptos_use::docs::BooleanDisplay; /// # /// # #[component] diff --git a/src/use_timeout_fn.rs b/src/use_timeout_fn.rs index ba89725..fe1cdff 100644 --- a/src/use_timeout_fn.rs +++ b/src/use_timeout_fn.rs @@ -93,9 +93,7 @@ where *timer.lock().unwrap() = None; #[cfg(debug_assertions)] - let _z = - leptos::reactive::diagnostics::SpecialNonReactiveZone::enter( - ); + let _z = leptos::reactive::diagnostics::SpecialNonReactiveZone::enter(); callback(arg); }