Clean up lints

This commit is contained in:
Corvus 2024-07-21 10:09:02 -06:00
parent c6914330b6
commit b0a4fca795
5 changed files with 4 additions and 5 deletions

View file

@ -93,7 +93,7 @@ impl<T: Clone> MaybeRwSignal<T> {
Self::DynamicRead(s) => { Self::DynamicRead(s) => {
let (r, w) = signal(s.get_untracked()); let (r, w) = signal(s.get_untracked());
create_effect(move |_| { Effect::new(move |_| {
w.update(move |w| { w.update(move |w| {
*w = s.get(); *w = s.get();
}); });

View file

@ -1,7 +1,6 @@
use crate::core::{ElementMaybeSignal, ElementsMaybeSignal}; use crate::core::{ElementMaybeSignal, ElementsMaybeSignal};
use cfg_if::cfg_if; use cfg_if::cfg_if;
use default_struct_builder::DefaultBuilder; use default_struct_builder::DefaultBuilder;
use leptos::prelude::diagnostics::SpecialNonReactiveZone;
cfg_if! { if #[cfg(not(feature = "ssr"))] { cfg_if! { if #[cfg(not(feature = "ssr"))] {
use leptos::prelude::*; use leptos::prelude::*;
@ -115,6 +114,7 @@ where
#[cfg(not(feature = "ssr"))] #[cfg(not(feature = "ssr"))]
{ {
use leptos::prelude::diagnostics::SpecialNonReactiveZone;
let OnClickOutsideOptions { let OnClickOutsideOptions {
ignore, ignore,
capture, capture,

View file

@ -1,7 +1,6 @@
use crate::core::ElementMaybeSignal; use crate::core::ElementMaybeSignal;
use cfg_if::cfg_if; use cfg_if::cfg_if;
use default_struct_builder::DefaultBuilder; use default_struct_builder::DefaultBuilder;
use leptos::prelude::diagnostics::SpecialNonReactiveZone;
use leptos::prelude::wrappers::read::Signal; use leptos::prelude::wrappers::read::Signal;
use leptos::prelude::*; use leptos::prelude::*;
use std::fmt::{Debug, Formatter}; use std::fmt::{Debug, Formatter};
@ -78,6 +77,7 @@ where
#[cfg(not(feature = "ssr"))] #[cfg(not(feature = "ssr"))]
{ {
use leptos::prelude::diagnostics::SpecialNonReactiveZone;
let UseDropZoneOptions { let UseDropZoneOptions {
on_drop, on_drop,
on_enter, on_enter,

View file

@ -91,7 +91,7 @@ pub fn use_media_query(query: impl Into<MaybeSignal<String>>) -> Signal<bool> {
listener.replace(Rc::new(move |_| update()) as Rc<dyn Fn(web_sys::Event)>); listener.replace(Rc::new(move |_| update()) as Rc<dyn Fn(web_sys::Event)>);
} }
create_effect(move |_| update()); Effect::new(move |_| update());
on_cleanup(cleanup); on_cleanup(cleanup);
}} }}

View file

@ -1,4 +1,3 @@
use leptos::prelude::wrappers::read::Signal;
use leptos::prelude::*; use leptos::prelude::*;
/// SSR compatibe `is_supported` /// SSR compatibe `is_supported`