diff options
-rw-r--r-- | runtime/src/window.rs | 2 | ||||
-rw-r--r-- | runtime/src/window/action.rs | 2 | ||||
-rw-r--r-- | winit/src/application.rs | 2 | ||||
-rw-r--r-- | winit/src/multi_window.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/runtime/src/window.rs b/runtime/src/window.rs index 24171e3e..e32465d3 100644 --- a/runtime/src/window.rs +++ b/runtime/src/window.rs @@ -197,7 +197,7 @@ pub fn change_icon<Message>(id: Id, icon: Icon) -> Command<Message> { /// Note that if the window closes before this call is processed the callback will not be run. pub fn run_with_handle<Message>( id: Id, - f: impl FnOnce(&WindowHandle<'_>) -> Message + 'static, + f: impl FnOnce(WindowHandle<'_>) -> Message + 'static, ) -> Command<Message> { Command::single(command::Action::Window(Action::RunWithHandle( id, diff --git a/runtime/src/window/action.rs b/runtime/src/window/action.rs index e44ff5a6..07e77872 100644 --- a/runtime/src/window/action.rs +++ b/runtime/src/window/action.rs @@ -106,7 +106,7 @@ pub enum Action<T> { /// said, it's usually in the same ballpark as on Windows. ChangeIcon(Id, Icon), /// Runs the closure with the native window handle of the window with the given [`Id`]. - RunWithHandle(Id, Box<dyn FnOnce(&WindowHandle<'_>) -> T + 'static>), + RunWithHandle(Id, Box<dyn FnOnce(WindowHandle<'_>) -> T + 'static>), /// Screenshot the viewport of the window. Screenshot(Id, Box<dyn FnOnce(Screenshot) -> T + 'static>), } diff --git a/winit/src/application.rs b/winit/src/application.rs index 3bc29255..f7508b4c 100644 --- a/winit/src/application.rs +++ b/winit/src/application.rs @@ -1050,7 +1050,7 @@ pub fn run_command<A, C, E>( use window::raw_window_handle::HasWindowHandle; if let Ok(handle) = window.window_handle() { - proxy.send(tag(&handle)); + proxy.send(tag(handle)); } } diff --git a/winit/src/multi_window.rs b/winit/src/multi_window.rs index 673a6f30..4cc08d18 100644 --- a/winit/src/multi_window.rs +++ b/winit/src/multi_window.rs @@ -1223,7 +1223,7 @@ fn run_command<A, C, E>( .get_mut(id) .and_then(|window| window.raw.window_handle().ok()) { - proxy.send(tag(&handle)); + proxy.send(tag(handle)); } } window::Action::Screenshot(id, tag) => { |