diff --git a/packages/signals/src/signal.rs b/packages/signals/src/signal.rs index 585b72caf..e7fe5d22e 100644 --- a/packages/signals/src/signal.rs +++ b/packages/signals/src/signal.rs @@ -473,7 +473,7 @@ impl> + 'static> Deref for Signal { // First we create a closure that captures something with the Same in memory layout as Self (MaybeUninit). let uninit_callable = MaybeUninit::::uninit(); // Then move that value into the closure. We assume that the closure now has a in memory layout of Self. - let uninit_closure = move || Self::read(unsafe { &*uninit_callable.as_ptr() }).clone(); + let uninit_closure = move || *Self::read(unsafe { &*uninit_callable.as_ptr() }); // Check that the size of the closure is the same as the size of Self in case the compiler changed the layout of the closure. let size_of_closure = std::mem::size_of_val(&uninit_closure); @@ -510,7 +510,7 @@ impl>> Drop for SignalSubscriberDrop /// A mutable reference to a signal's value. /// /// T is the current type of the write -/// B is the dynamicly checked type of the write (RefMut) +/// B is the dynamically checked type of the write (RefMut) /// S is the storage type of the signal /// I is the type of the original signal pub struct Write, S: Storage>, I: 'static = T> { @@ -640,7 +640,7 @@ impl> + 'static> Deref for ReadOnlySignal). let uninit_callable = MaybeUninit::::uninit(); // Then move that value into the closure. We assume that the closure now has a in memory layout of Self. - let uninit_closure = move || Self::read(unsafe { &*uninit_callable.as_ptr() }).clone(); + let uninit_closure = move || *Self::read(unsafe { &*uninit_callable.as_ptr() }); // Check that the size of the closure is the same as the size of Self in case the compiler changed the layout of the closure. let size_of_closure = std::mem::size_of_val(&uninit_closure); diff --git a/packages/web/src/lib.rs b/packages/web/src/lib.rs index 99aa131db..bdd9511b4 100644 --- a/packages/web/src/lib.rs +++ b/packages/web/src/lib.rs @@ -60,7 +60,7 @@ use std::rc::Rc; pub use crate::cfg::Config; #[cfg(feature = "file_engine")] pub use crate::file_engine::WebFileEngineExt; -use dioxus_core::{ComponentFunction, CrossPlatformConfig, VirtualDom}; +use dioxus_core::CrossPlatformConfig; use futures_util::{ future::{select, Either}, pin_mut, FutureExt, StreamExt, @@ -99,12 +99,8 @@ mod rehydrate; /// wasm_bindgen_futures::spawn_local(app_fut); /// } /// ``` -pub async fn run_with_props< - Component: ComponentFunction, - Props: Clone + 'static, - Phantom: 'static, ->( - dioxus_config: CrossPlatformConfig, +pub async fn run_with_props( + dioxus_config: CrossPlatformConfig, web_config: Config, ) { tracing::info!("Starting up"); diff --git a/packages/web/src/platform.rs b/packages/web/src/platform.rs index 5c9d95473..e365f52b0 100644 --- a/packages/web/src/platform.rs +++ b/packages/web/src/platform.rs @@ -8,10 +8,7 @@ pub struct WebPlatform; impl PlatformBuilder for WebPlatform { type Config = Config; - fn launch, Phantom: 'static>( - config: CrossPlatformConfig, - platform_config: Self::Config, - ) { + fn launch(config: CrossPlatformConfig, platform_config: Self::Config) { wasm_bindgen_futures::spawn_local(async move { crate::run_with_props(config, platform_config).await; });