diff --git a/packages/desktop/src/app.rs b/packages/desktop/src/app.rs index 695da5039..023196c11 100644 --- a/packages/desktop/src/app.rs +++ b/packages/desktop/src/app.rs @@ -18,7 +18,7 @@ use std::{ sync::Arc, }; use tao::{ - dpi::{PhysicalPosition, PhysicalSize}, + dpi::PhysicalSize, event::Event, event_loop::{ControlFlow, EventLoop, EventLoopBuilder, EventLoopProxy, EventLoopWindowTarget}, window::WindowId, @@ -478,7 +478,9 @@ impl App { let window = &webview.desktop_context.window; let position = (state.x, state.y); let size = (state.width, state.height); - window.set_outer_position(PhysicalPosition::new(position.0, position.1)); + window.set_outer_position(tao::dpi::PhysicalPosition::new( + position.0, position.1, + )); window.set_inner_size(PhysicalSize::new(size.0, size.1)); } } diff --git a/packages/hooks/src/use_signal.rs b/packages/hooks/src/use_signal.rs index 3863f11a5..47d603671 100644 --- a/packages/hooks/src/use_signal.rs +++ b/packages/hooks/src/use_signal.rs @@ -84,7 +84,6 @@ pub fn use_signal_sync(f: impl FnOnce() -> T) -> Signa fn use_maybe_signal_sync>>( f: impl FnOnce() -> T, ) -> Signal { - #[cfg(debug_assertions)] let caller = std::panic::Location::caller(); // todo: (jon) @@ -92,11 +91,5 @@ fn use_maybe_signal_sync>>( // any calls to .read() in the body will re-subscribe the component to the signal // use_before_render(move || signal.unsubscribe(current_scope_id().unwrap())); - use_hook(|| { - Signal::new_with_caller( - f(), - #[cfg(debug_assertions)] - caller, - ) - }) + use_hook(|| Signal::new_with_caller(f(), caller)) } diff --git a/packages/signals/src/signal.rs b/packages/signals/src/signal.rs index e1592d92e..00e6e6112 100644 --- a/packages/signals/src/signal.rs +++ b/packages/signals/src/signal.rs @@ -165,6 +165,7 @@ impl>> Signal { /// use_hook(move || Signal::new_with_caller(function(), caller)) /// } /// ``` + #[allow(unused)] pub fn new_with_caller(value: T, caller: &'static std::panic::Location<'static>) -> Self { Self { inner: CopyValue::new_with_caller(