diff --git a/leptos_reactive/src/diagnostics.rs b/leptos_reactive/src/diagnostics.rs index d026592b51..15e12c144d 100644 --- a/leptos_reactive/src/diagnostics.rs +++ b/leptos_reactive/src/diagnostics.rs @@ -26,7 +26,7 @@ cfg_if::cfg_if! { use std::cell::Cell; thread_local! { - static IS_SPECIAL_ZONE: Cell = Cell::new(false); + static IS_SPECIAL_ZONE: Cell = const { Cell::new(false) }; } } } diff --git a/leptos_reactive/src/resource.rs b/leptos_reactive/src/resource.rs index 3d5e89839f..84acc41037 100644 --- a/leptos_reactive/src/resource.rs +++ b/leptos_reactive/src/resource.rs @@ -1518,7 +1518,7 @@ impl UnserializableResource for ResourceState { } thread_local! { - static SUPPRESS_RESOURCE_LOAD: Cell = Cell::new(false); + static SUPPRESS_RESOURCE_LOAD: Cell = const { Cell::new(false) }; } #[doc(hidden)] diff --git a/leptos_reactive/src/stored_value.rs b/leptos_reactive/src/stored_value.rs index 0ec2e95a62..5344831e1d 100644 --- a/leptos_reactive/src/stored_value.rs +++ b/leptos_reactive/src/stored_value.rs @@ -242,7 +242,7 @@ impl StoredValue { with_runtime(|runtime| { let n = { let values = runtime.stored_values.borrow(); - values.get(self.id).map(Rc::clone) + values.get(self.id).cloned() }; if let Some(n) = n {